home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / applic / ntp / doc / dts.txt < prev    next >
Encoding:
Text File  |  1991-09-29  |  219.1 KB  |  3,883 lines

  1. Comparison of the Network Time Protocol and Digital Time Service
  2.  
  3. Editor's Note
  4.  
  5. This document includes transcripts of an exchange of messages between
  6. Dave Mills of UDel, Dennis Ferguson of UToronto, Joe Comuzzi of DEC and
  7. Mike Soha of DEC. The issue under discussion is a comparison and
  8. evaluation of the Network Time Protocol (NTP) and the Digital Time
  9. Service (DTS). It is important to point out that these messages are
  10. informal, sometimes opinionated and may contain errors of judgement and
  11. technical detail. Some points of confusion and misstatement in the
  12. initial exchanges are clarified as the discussion moves on. The messages
  13. have been lightly edited to remove nonrelevant asides and repetitive
  14. material, as well as to unify format style.
  15.  
  16. This document is provided for informal, collaborative use in research
  17. only and should not be quoted or cited in a professional publication.
  18.  
  19. David L. Mills
  20. Electrical Engineering Department
  21. University of Delaware
  22. 1 September 1990
  23.  
  24. ------------------------------------------------------------------------
  25.  
  26. Draft document distributed to the NTP engineering group on 12 February
  27. 1990:
  28.  
  29.    A Comparison of the Network Time Protocol and Digital Time Service
  30.  
  31.                              David L. Mills
  32.                    Electrical Engineering Department
  33.                          University of Delaware
  34.  
  35. 1. Introduction
  36.  
  37. The Digital Time Service (DTS) for the Digital Network Architecture
  38. (DECnet) is intended to synchronize time in computer networks ranging in
  39. size from local to wide-area. As such it is intended to provide service
  40. comparable to the Network Time Protocol (NTP) for the Internet
  41. architecture. This memorandum compares the architectures, functions and
  42. design issues of NTP and DTS with respect to correctness, stability,
  43. accuracy and reliability. It is based on information available in the
  44. various RFCs [MIL89], [MIL90b], journal articles [MIL90a], [MIL90b] and
  45. other sources [MIL90c] for NTP and on the DTS functional specification
  46. [DEC89].
  47.  
  48. In this memorandum the stability of a clock is how well it can maintain
  49. a constant frequency, the accuracy is how well its frequency and time
  50. compare with national standards and the precision is how precisely these
  51. quantities can be resolved within a particular timekeeping system. The
  52. offset of two clocks is the time difference between them, while the skew
  53. is the frequency difference (first derivative of offset with time). Real
  54. clocks exhibit some variation in skew (second derivative of offset with
  55. time), which is called drift. The correctness of a timekeeping system is
  56. the degree to which it indicates valid UTC according to some criteria,
  57. while its reliability is the fraction of the time it can be kept
  58. operating and connected in the network.
  59.  
  60. Local clocks are maintained at designated time servers, which are
  61. timekeeping systems belonging to a synchronization subnet in which each
  62. server measures the offsets between its local clock and the clocks of
  63. other servers in the subnet. In this memorandum to synchronize frequency
  64. means to adjust the clocks in the subnet to run at the same frequency,
  65. to synchronize time means to set them to agree at a particular epoch
  66. with respect to Coordinated Universal Time (UTC), as provided by
  67. national standards, and to synchronize clocks means to synchronize them
  68. in both frequency and time. The goal of a distributed timekeeping
  69. service such as NTP and DTS is to synchronize the clocks in all
  70. participating servers and clients so that all are correct, indicate the
  71. same time relative to UTC, and maintain specified measures of stability,
  72. accuracy and reliability.
  73.  
  74. By international agreement the primary frequency reference for our
  75. civilization is the atomic oscillator. The standard second is determined
  76. as a specified number of atomic cycles, the standard day as 86,400
  77. standard seconds and the standard (Julian) year as 365.25 standard days.
  78. In order to maintain the nominal solar year, the Gregorian calendar
  79. mandates the insertion of leap days, which in the absence of political
  80. upheaval can be determined far in advance. In order to maintain the
  81. nominal solar day, leap seconds must be inserted at times which cannot
  82. be reliably determined in advance. The basis of civil time is the UTC
  83. clock, which first ticked at 0h on 1 January 1972. Without knowledge of
  84. prior leap seconds, an event determined on the UTC timescale can appear
  85. some 15 seconds late on the Julian timescale.
  86.  
  87. Both the NTP and DTS timescales are based on the UTC timescale and are
  88. intended to run at atomic frequency with leap seconds inserted at times
  89. decreed by international agreement; however, they are each calibrated in
  90. different increments starting from different historic dates. While they
  91. both are intended to thrive in large, undisciplined network systems,
  92. they differ considerably in their statistical models, algorithms and
  93. service metrics. In following sections the similarities and differences
  94. are discussed at length, along with implications bearing on correctness,
  95. stability, accuracy and reliability.
  96.  
  97. 2. Basic Principles and Functionality
  98.  
  99. Both NTP and DTS are designed for use in proliferated computer networks
  100. with possibly many embedded local nets interconnected by routers,
  101. gateways and bridges and involving both broadcast and point-to-point
  102. transmission media. This section summarizes the architecture and service
  103. objectives of NTP and DTS in turn.
  104.  
  105. 2.1. The Network Time Protocol
  106.  
  107. The NTP synchronization subnet consists of a tree-structured graph with
  108. nodes representing time servers and edges representing the transmission
  109. paths between them. The root nodes of the tree are represented by
  110. designated primary servers which synchronize to a radio broadcast or
  111. calibrated atomic clock. The remaining nodes are designated secondary
  112. servers which synchronize to other servers, both primary and secondary.
  113. The number of subnet hops between a particular server and a primary
  114. server determines the stratum level of that server. All servers, except
  115. possibly those at the leaves of the tree, have identical functionality
  116. and can operate simultaneously as clients of the next lower stratum
  117. level and servers for the next higher one.
  118.  
  119. Servers, both primary and secondary, typically run NTP with several
  120. other servers at the same or lower stratum levels; however, a selection
  121. algorithm attempts to select the most accurate and reliable server or
  122. set of servers from which to actually synchronize the local clock. The
  123. selection algorithm, described in more detail later in this document,
  124. uses a maximum-likelihood clustering algorithm to determine the best
  125. from among a number of possible servers. The synchronization subnet
  126. itself is automatically constructed from among the available paths using
  127. the distributed Bellman-Ford routing algorithm [BER87], in which the
  128. distance metric is modified hop count.
  129.  
  130. NTP operates in various modes in order to improve efficiency on local
  131. wires with many clients. These support operation in conventional RPC
  132. client/server modes, as well as symmetric and multicast modes. The
  133. symmetric modes provide a flexible backup function in which the
  134. direction of time synchronization between a pair of servers can reverse
  135. due to loss of reachability or quality of service along one path or
  136. another in the synchronization subnet. The multicast mode is designed to
  137. provide time to personal workstations where the full accuracy of the
  138. other modes is not required.
  139.  
  140. The NTP specification includes no architected procedures for servers to
  141. obtain addresses of other servers other than by configuration files and
  142. public bulletin boards. While servers passively respond to requests from
  143. other servers, they must be configured in order to actively probe other
  144. servers. Servers configured as active poll other servers continuously,
  145. while servers configured as passive poll only when polled by another
  146. server. There are no provisions in the present protocol to dynamically
  147. activate some servers should other servers fail.
  148.  
  149. In response to stated needs for security features, NTP includes an
  150. optional cryptographic authentication mechanism. NTP also includes an
  151. optional comprehensive remote monitoring mechanism found necessary for
  152. the detection and repair of various problems in server and network
  153. configuration and operation. It is anticipated that, when generic
  154. features capable of these functions have been developed and deployed in
  155. the Internet, the NTP authentication and monitoring mechanisms may be
  156. withdrawn.
  157.  
  158. 2.2. The Digital Time Service
  159.  
  160. In DTS a synchronization subnet consists of a structured graph with
  161. nodes consisting of clerks, servers, couriers and time providers. With
  162. respect to the NTP nomenclature, a time provider is a primary server, a
  163. courier is a secondary server intended to import time from one or more
  164. distant primary servers for local redistribution and a server is
  165. intended to provide time for possibly many end nodes or clerks. Time
  166. providers, servers and couriers are evidently generic, in that all
  167. perform similar functions and have similar or identical internal
  168. structure. The intent is that time providers can be set from radios,
  169. telephone calls to NIST [NBS88] or even manually.
  170.  
  171. As in NTP, DTS clients and servers periodically request the time from
  172. other servers, although the subnet has only a limited ability to
  173. reconfigure in the event of failure. The selection algorithm used in
  174. DTS, which is based on the work presented in Marzullo's dissertation and
  175. reported in [MAR85], will be discussed in detail later in this document.
  176.  
  177. On local nets DTS servers multicast to each other in order to construct
  178. lists of servers available on the local wire. Clerks multicast requests
  179. for these lists, which are returned in monocast mode similar to ARP in
  180. the Internet. Couriers consult the network directory system to find
  181. global time providers. For local-net operation more than one server can
  182. be configured to operate as a courier, but only one will actually
  183. operate as a courier at a time. There does not appear to be a multicast
  184. function in which a personal workstation could obtain time simply by
  185. listening on the local wire without first obtaining a list of local
  186. servers.
  187.  
  188. In the DTS model the directory, authentication and management functions
  189. are provided by other layers, entities and protocols in the DECnet
  190. architecture. As evident from other documents in the DECnet
  191. specification suite, these functions are evidently highly developed and
  192. integrated in the architecture and presumably provide equivalent
  193. functionality as the NTP authentication and monitoring mechanisms.
  194.  
  195. 3. Statistical Models and Data Representation
  196.  
  197. Perhaps the widest departure between the NTP and DTS philosophies is the
  198. basic underlying statistical model. NTP is based on maximum-likelihood
  199. principles and statistical mechanics, where errors are expressed in
  200. terms of expectations. DTS is based on provable assertions about the
  201. correctness of a set of mutually suspicious clocks, where errors are
  202. expressed as a set of computable bounds on maximum time and frequency
  203. offsets. This section explores these models and how they affect the
  204. quality of service.
  205.  
  206. 3.1. Statistical Models
  207.  
  208. The conventional analytical model for real synchronized clocks [ALL74],
  209. [MIT80] consists of a set of oscillators connected by transmission
  210. paths. The oscillators are characterized by a set of random variables
  211. that describe their intrinsic time and frequency offsets relative to a
  212. reference timescale. In this analysis the time and frequency of an
  213. oscillator cannot be known exactly and must be described using random
  214. variables with assumed or derived probability density functions. It is
  215. possible to quantify absolute upper and lower limits of accuracy only
  216. with respect to the these functions. In conventional analysis the
  217. transmission paths between the clocks are modelled as stochastic delays,
  218. with assumed distributions, usually of exponential type. These paths are
  219. used to exchange timing information and adjust the time and frequency
  220. offsets of each oscillator. The behavior of individual clocks, both in
  221. accuracy and stability, can then be characterized using standard
  222. engineering tools, such as the theory of phase-locked loops familiar to
  223. communications engineers [LIN80], [SMI86].
  224.  
  225. In the model used by DTS and several others in the literature (see
  226. MIL90b]) a number of assumptions are made, explicitly or implicitly,
  227. about the shape of the probability density functions describing the
  228. inherent accuracy and stability of clocks, as well as the delays on the
  229. transmission paths connecting them. DTS assumes the reading error
  230. (offset relative to UTC) of a clock has a computable bound. In addition,
  231. DTS assumes the frequency error (called drift in the DTS functional
  232. specification) is bounded by an implementation constant. A correct clock
  233. never strays outside these bounds, which are computed from the inherent
  234. characteristics of the clock, the inherited characteristics of its
  235. selected synchronization source, the measured propagation delay and the
  236. accumulated error since last updated. If it is assumed that real clocks
  237. and transmission paths can be modelled reliably in this fashion, then
  238. the DTS algorithm can maintain a system of correct clocks.
  239. The philosophy inherent in the NTP algorithms is to consider all
  240. possible information available in the stochastic model and measured
  241. statistics to arrive at a probabilistic conclusion. The time delivered
  242. by an NTP subnet is intended to be the most likely measurement in a
  243. probabilistic system in which all measurements have been weighted toward
  244. the most likely outcome. However, there is no guarantee that all clocks
  245. in the system are valid in the sense of provable correctness. No attempt
  246. is made to determine correctness other than on a statistical basis.
  247.  
  248. On the other hand, DTS starts with a set of assumptions on the bounds of
  249. error and growth of error bounds with time. The clock selection
  250. algorithm is based on an intersection operation which preserves
  251. correctness according to these assumptions. As long as the underlying
  252. probability distributions can be bounded absolutely, DTS will deliver
  253. provably correct time, if at all. But, real distributions seldom behave
  254. this way, especially in the Internet, where the distributions can have
  255. surprisingly long tails. Thus, there will almost always exist a tail in
  256. the distribution which can be truncated only at the expense of some
  257. error. In other words, the DTS assumptions must be considered valid only
  258. in the context of the probability distributions actually observed.
  259.  
  260. In summary, NTP attempts to deliver the best estimate of time and
  261. frequency with presumably the lowest estimated error, but can not
  262. guarantee the correctness of the indication relative to an arbitrary set
  263. of rigid assumptions. DTS attempts to deliver correct time according to
  264. stated assumptions, but correctness can be guaranteed only with respect
  265. to these assumptions and these assumptions can be guaranteed only on a
  266. probabilistic basis.
  267.  
  268. 3.2. Maximum Likelihood Estimation
  269.  
  270. It is possible to obtain various measures of expected error when
  271. processing timekeeping data and use these measures to establish
  272. preference in the various estimation algorithms. Called maximum-
  273. likelihood estimation, these techniques are widely used in signal
  274. processing and communication systems. For instance, experiments show
  275. [MIL90b] that, in a list of delay/offset measurements ordered by
  276. roundtrip delay, the most accurate offsets are usually associated with
  277. the lower delays. When selecting the best offset sample from a single
  278. clock or when selecting the best set of clocks in an ensemble, NTP gives
  279. the lower-delay samples greater weight in the filtering, selection and
  280. combining procedures.
  281.  
  282. Now consider the DTS selection algorithm, which is due to Marzullo
  283. [MAR85]. The following diagram shows two scenarios (1) and (2) involving
  284. three clocks A, B and C. Each of the dashed lines represents the
  285. interval of time offsets considered correct for that clock. As suggested
  286. in [MAR85], the probability of a particular clock reading can be assumed
  287. independent and uniformly distributed over the entire interval.
  288.  
  289.          A  +--------------------------+            A  +-+
  290.          B  +--------------------------+            B  +-+
  291.          C              +-+                         C  +-+
  292.  
  293.     Result              +-+                    Result  +-+
  294.  
  295.                         (1)                            (2)
  296.  
  297. According to the algorithm, the outcome is determined in both cases by
  298. the intersection of the three intervals. However, once the intersection
  299. has been formed, all probabilistic information of antecedent
  300. distributions is lost. Put another way, the probability of the joint
  301. event consisting of the intersection of all three intervals is far lower
  302. in (1) than in (2). In NTP this information has proved highly useful in
  303. mitigating clock selection; however, the information is lost in DTS.
  304.  
  305. 3.3. Representation of Timestamp Data
  306.  
  307. Both NTP and DTS exist to provide timestamps to some specified accuracy
  308. and precision. NTP represents time as a 64-bit quantity in seconds and
  309. fractions, with 32 bits as integral seconds and 32 bits as the fraction
  310. of a second. This provides resolution to about 200 picoseconds and
  311. rollover ambiguity of about 136 years. The origin of the timescale and
  312. its correspondence with UTC, atomic time and Julian days is documented
  313. in [MIL90c]. DTS represents time to a precision of 100 nanoseconds,
  314. although there appears to be no specified maximum value.
  315.  
  316. The origin of the present 136-year NTP time cycle is specified as the
  317. first instant of the tropical year that began this century, which is an
  318. astronomically verifiable epoch. The origin of the DTS timescale appears
  319. to be implementation of the papal bull establishing the Gregorian
  320. calendar in 1582, although this instant is verifiable only by historic
  321. record. However, UTC did not exist prior to 1972 and the Gregorian
  322. calendar did not achieve widespread use until the early years of the
  323. twentieth century. While not specified, presumably DTS reckons the
  324. years, leap years and Julian days of the conventional calendar as
  325. described in the NTP specification [MIL89] and further elaborated in
  326. [MIL90c]. In retrospect, it might have been better if both NTP and DTS
  327. had adopted Modified Julian Day (MJD) numbering directly and avoided
  328. tropical centuries and papal bulls altogether.
  329.  
  330. With respect to applications involving precision time data, such as
  331. national standards laboratories, resolutions less than the 100
  332. nanoseconds provided by DTS are required. Present timekeeping systems
  333. for space science and navigation can maintain time to better than 30
  334. nanoseconds, while range data over interplanetary distances can be
  335. determined to less than a nanosecond. While an ordinary application
  336. running on an ordinary computer could not reasonably be expected to
  337. expect or render precise timestamps anywhere near the 200-picosecond
  338. limit of an NTP timestamp, there are many applications where a precision
  339. timestamp could be rendered by some other means and propagated via a
  340. computer and network to some other place for processing. One such
  341. application could well be synchronizing navigation systems like LORAN-C,
  342. where the timestamps would be obtained directly from station timekeeping
  343. equipment.
  344.  
  345. 3.4. Time Zones and Leap Seconds
  346.  
  347. NTP specifically and intentionally has no provisions anywhere in the
  348. protocol to specify time zones or zone names. The service is designed to
  349. deliver UTC seconds and Julian days without respect to geographic
  350. position, political boundary or local custom. Conversion of NTP
  351. timestamp data to system format is expected to occur at the presentation
  352. layer; however, provisions are made to supply leap-second information to
  353. the presentation layer so that network time in the vicinity of leap
  354. seconds can be properly coordinated. DTS includes provision for time
  355. zones and presumably summer/winter adjustments in the form of a
  356. numerical time offset from UTC and arbitrary character-string label;
  357. however, it is not obvious how to distribute and activate this
  358. information in a coordinated manner.
  359.  
  360. NTP and DTS differ somewhat in the treatment of leap seconds. In DTS the
  361. normal growth in error bounds in the absence of corrections will
  362. eventually cause the bounds to include the new timescale and adjust
  363. gradually as in normal operation. Recognizing that this can take a long
  364. time, DTS includes special provisions that expand the error bounds at
  365. such times that leap seconds are expected to occur, which can shorten
  366. the period for convergence significantly. However, until the correction
  367. is determined and during the convergence interval the accuracy of the
  368. local clock with respect to other network clocks may be considerably
  369. degraded.
  370.  
  371. The accuracy and stability expectations of NTP preclude this approach.
  372. In NTP the incidence of leap seconds is assumed available in advance at
  373. all primary servers and distributed automatically throughout the
  374. remainder of the synchronization subnet as part of normal protocol
  375. operations. Thus, every server and client in the subnet is aware at the
  376. instant the leap second is to take affect, and steps the local clock
  377. simultaneously with all other servers in the subnet. Thus, the local
  378. clock accuracy and stability are preserved before, during and after the
  379. leap insertion.
  380.  
  381. 3.5. Determining Time Offset and Roundtrip Delay
  382.  
  383. At first glance it may appear that NTP and DTS have quite different
  384. models to determine delay, offset and error budgets. Both involve the
  385. exchange of messages between two servers (or a client and a server).
  386. Both attempt to measure not only the clock offsets, but the roundtrip
  387. delay and, in addition, attempt to estimate the error. The diagrams
  388. below, in which time flows downward, illustrate a typical message
  389. exchange in each protocol between servers A and B.
  390.  
  391.               A          B                 A          B
  392.  
  393.               |          |                 |          |
  394.            t1 |--------->| t2           t1 |--------->|--- t4
  395.               |          |                 |          | |
  396.               |          |                 |          |
  397.               |          |                 |          | w
  398.               |          |                 |          |
  399.               |          |                 |          | |
  400.            t4 |<---------| t3           t8 |<---------|---
  401.               |          |                 |          |
  402.  
  403.                    NTP                         DTS
  404.  
  405. In NTP the roundtrip delay d and clock offset c of server B relative to
  406. A is
  407.  
  408.                          d = (t4-t1) - (t3-t2)
  409.                        c = ((t2-t1) + (t3-t4))/2.
  410.  
  411. This method amounts to a continuously sampled, returnable-time system,
  412. which is used in some digital telephone networks [LIN80]. Among its
  413. advantages are that both server A and server B can simultaneously
  414. calculate the delay and offset knowing only the latest time of arrival
  415. and the three preceding timestamps, which in NTP are carried with the
  416. message and can also used for authentication purposes. the order and
  417. timing of the messages are unimportant and reliable delivery is not
  418. required.
  419.  
  420. In DTS server A remembers timestamp t1 (other numbered events shown in
  421. the DTS functional specification are not shown in the diagram) and
  422. expects server B to return t4, the time of arrival of the request from
  423. server A, and w, the time elapsed until the departure of the response to
  424. server A. In principle, although NTP is symmetric and DTS is not, the
  425. two schemes are computationally equivalent and either can compute delay
  426. and offset using similar formulas.
  427.  
  428. Both NTP and DTS have to do a little dance in order to account for
  429. timing errors due to the precisions of the local clocks and the
  430. frequency offsets (usually minor) over the transaction interval itself.
  431. A purist might argue that the expression given above for delay and
  432. offset are not strictly accurate unless the probability density
  433. functions for the path delays are known, properly convolved and
  434. expectations computed, but this applies to both NTP and DTS. The point
  435. should be made, however, that correct functioning of DTS requires
  436. reliable bounds on measured roundtrip delay, as this enters into the
  437. error budget used to construct intervals over which a clock can be
  438. considered correct. This is not nearly as important in NTP, since the
  439. accuracy and stability of the local clock is largely due to the local
  440. clock model, which is described later in this document.
  441.  
  442. 4. Processing Algorithms
  443.  
  444. At the heart of any time synchronization system are the algorithms which
  445. process the data received from possibly many servers, filter out noise
  446. in the form of outlyers and select the best from among a population of
  447. mutually suspicious clocks. Issues of the NTP and DTS data filtering,
  448. clock selection and combining algorithms are compared and discussed in
  449. following subsections.
  450.  
  451. 4.1. Data Filtering
  452.  
  453. In both the NTP and DTS models a number of offsets are collected from
  454. each of possibly many servers. In principle, the accuracy and precision
  455. of measurements made between any pair of servers can be improved by
  456. selecting or combining a number of sequential samples in various ways.
  457. In NTP a comprehensive program of analysis and experiment lasting
  458. several years and using many Internet transmission paths involving local
  459. nets and wide-area nets resulted in what is called the minimum-filter
  460. algorithm [MIL90b]. Reduced to essentials, this algorithm selects from
  461. among the last n samples of delay/offset collected from a single server
  462. the sample with minimum delay and presents the associated offset as the
  463. time offset estimate for that server. This is done separately for each
  464. server on a continuous basis at intervals from about one minute to about
  465. 17 minutes. As part of this continuing process, an error estimate called
  466. the sample dispersion is constructed as the sum of weighted differences
  467. of the resulting estimate offset relative to the other n-1 samples
  468. considered in the selection.
  469.  
  470. In DTS the same algorithm used to select a cohort set of servers from a
  471. population possibly including faulty servers (see next section) is used
  472. to filter the samples from a single server. This approach was discarded
  473. early in the NTP design experience for two reasons. First, the
  474. statistical problem of selecting good samples from a sequence produced
  475. by a single server has the very considerable advantage that the
  476. underlying probability distribution can be assumed stationary and
  477. represented by robust statistics such as produced by nonlinear trimmed-
  478. mean filters, median filters and the NTP minimum filter. Second, the
  479. problem of selecting good clocks from bad involves a multivariate
  480. statistical model characteristic of pattern analysis and classification.
  481. It has been the NTP experience that algorithms that work well on one of
  482. these two problems usually do not do well on the other.
  483.  
  484. 4.2. Clock Selection and Combining
  485.  
  486. In both NTP and DTS the problem persists that there is often no clear
  487. distinction between truechimers and falsetickers, so that "correct"
  488. clocks can be deduced only on a probabilistic basis and then only
  489. according to arbitrary criteria. It could be argued on the basis of
  490. experience, for example, that various kinds of faulty behavior are more
  491. likely than others. For instance, it is probable that a faulty clock
  492. more likely indicates hot ones, cold zeros or an integral number of
  493. seconds, minutes, days or years in error, rather than fractional parts
  494. of these quantities. A clock that comes up with no prior hint of correct
  495. time has a vanishing probability of coming up anywhere near UTC by
  496. simple nature of the measurement space. In NTP, for example, this would
  497. amount to guessing the correct 256-ms window in an interval of 136
  498. years. Interesting observations on these points, including the use of an
  499. NTP timestamp as a cryptographic one-time pad, can be found in the
  500. references.
  501.  
  502. NTP maintains for each server both the total estimated roundtrip delay
  503. to the root of the synchronization subnet (synchronizing distance), as
  504. well as the sum of the total dispersion to the root of the
  505. synchronization subnet (synchronizing dispersion). These quantities are
  506. included in the message exchanges and form the basis of the likelihood
  507. calculations. Since they always increase from the root, they can be used
  508. to calculate accuracy and reliability estimates, as well as to manage
  509. the subnet topology to reduce errors and resist destructive timing
  510. loops.
  511.  
  512. In NTP the selection algorithm determines one or a number of
  513. synchronization candidates based on empirical rules and maximum-
  514. likelihood techniques. A combining algorithm determines the local-clock
  515. adjustment using a weighted-average procedure in which the weights are
  516. determined by offset sample dispersion. The algorithm begins by
  517. constructing a list of candidate clocks sorted first by stratum and then
  518. by total synchronization dispersion to the root. The list is then pruned
  519. from the end to a manageable size and to eliminate very noisy and
  520. probably defective clocks. On the assumption that a valid
  521. synchronization candidate will always be at the lowest or next from
  522. lowest stratum, the list is truncated at the first entry where the
  523. number of different strata on the list exceeds two. This particular
  524. procedure and choice of parameters have been found to produce reliable
  525. synchronization candidates over a wide range of system environments
  526. while minimizing the "pulling" effect of high-stratum, high-dispersion
  527. servers, especially when a large number of servers are involved.
  528.  
  529. The next step is designed to detect falsetickers or other conditions
  530. which might result in gross errors. The pruned and truncated candidate
  531. list is re-sorted in the order first by stratum and then by total
  532. synchronizing distance to the root; that is, in order of decreasing
  533. likelihood. A similar procedure is also used in Marzullo's MM algorithm
  534. [MAR85]. Next, each entry is inspected in turn and a weighted error
  535. estimate computed relative to the remaining entries on the list. The
  536. entry with maximum estimated error is discarded and the process repeats.
  537. The procedure terminates when the estimated error of each entry
  538. remaining on the list is less than a quantity depending on the intrinsic
  539. precisions of the local clocks involved.
  540.  
  541. The NTP selection algorithm is designed to favor those servers near the
  542. head (maximum likelihood) of the candidate list, which are at the lowest
  543. stratum and lowest delay and presumably can provide the most accurate
  544. time. With proper selection of weighting factors, outlyers are discarded
  545. from the tail of the list, unless some other entry disagrees
  546. significantly with respect to the remaining entries, in which case that
  547. entry is discarded first. The offsets of the surviving servers are
  548. statistically equivalent, so any of them can be chosen to adjust the
  549. local clock. Some implementations [MIL90c] combine them using a
  550. weighted-average algorithm similar to that used by national standards
  551. laboratories [ALL74], in which the offsets of the servers remaining on
  552. the list are weighted by sample dispersion to produce a combined
  553. estimate.
  554.  
  555. DTS uses a rather different technique, where the goal emphasized is
  556. validated correctness relative to a set of specified criteria. A compact
  557. way of expressing this algorithm is the following. Each clock is
  558. expressed as an estimate C and an inherent or inherited error E, which
  559. defines an interval [C-E,C+E]. A clock is correct if the interval
  560. includes UTC and incorrect if not; however, it is not known in advance
  561. which is the case. Consider M such intervals with j possibly faulty
  562. servers and arrange the lower endpoints on a list by increasing endpoint
  563. value. Starting from the beginning of the list, find the first point
  564. which is contained in at least M-f intervals. This defines the lower
  565. boundary of the correct interval. If no such point is found, increase f
  566. by one and try again. A similar procedure is used for the upper limit of
  567. the correct interval.
  568.  
  569. The error E used to construct the above intervals is determined both by
  570. the intrinsic characteristics of the clock oscillator (precision), the
  571. reading delay between the client request and server response and the
  572. frequency offset over the interval since the oscillator was last
  573. adjusted. Once established by the above algorithm, the correct interval
  574. grows with time, possibly engulfing intervals previously considered
  575. faulty. The interval between client requests is carefully computed to
  576. prevent the correct interval from exceeding a configuration parameter.
  577.  
  578. The fundamental assumption upon which the DTS is founded is Marzullo's
  579. proof that a set of M clocks synchronized by the above algorithm, where
  580. no more than j clocks are faulty, delivers an interval including UTC.
  581. The algorithm is simple, both to express and to implement, and involves
  582. only one sorting step instead of two as in NTP. However, consider the
  583. following scenario with M = 3, j = 1 and containing three intervals A, B
  584. and C:
  585.  
  586.                  A  +--------------------------+
  587.                  B  +----+
  588.                  C                        +----+
  589.  
  590.             Result  +-----================-----+
  591.  
  592. Using the algorithm described in the DTS functional specification, both
  593. the lower and upper endpoints of interval A are in M-j = 2 intervals,
  594. thus the resulting interval is coincident with A. However, there remains
  595. the interval marked "=" which contains points not contained in at least
  596. two other intervals. The DTS document mentions this interesting fact,
  597. but makes a quite reasonable choice to avoid multiple intervals in favor
  598. of a single one, even if that does in principle violate the correctness
  599. assumptions. The purist would say that a choice has to be made, either
  600. the left intersection or the right one, perhaps mitigated by maximum-
  601. likelihood principles. This example would seem to violate the
  602. fundamental basis on which the proof of correctness of Marzullo's
  603. algorithm is based.
  604.  
  605. In fact, quite similar algorithms were once used in predecessors of NTP
  606. [MIL85a], [MIL85b], but discarded because they produced inadequate
  607. accuracy and stability. One of the problems with algorithms such as this
  608. is that normal variations in network path delay cause frequent occasions
  609. when one clock or another pops in or out of one correction interval or
  610. another, causing the interval to change size and resulting in large
  611. phase noise of the local clock. While the phenomenon is much reduced in
  612. the present NTP design, some "clockhopping" does occur and is the
  613. primary contributor in NTP to clock instability. Another reason these
  614. algorithms were abandoned was that incidental error estimates, such as
  615. the size of the correct interval, cannot be used either for likelihood
  616. estimation or to organize the subnet topology.
  617.  
  618. 5. Local Clocks
  619.  
  620. There are fundamental differences between the NTP and DTS local-clock
  621. models. The DTS (and Unix) model assumes the local clock runs at a rate
  622. R determined by its integral quartz resonator, which may be manufactured
  623. to a tolerance no better than 100 ppm, which corresponds to several
  624. seconds per day. A correction is introduced as an offset, which causes a
  625. number of fractional seconds to be added or subtracted from the local
  626. clock. In order to avoid large discontinuities and insure monotonicity,
  627. the rate at which the clock can be adjusted is fixed by an
  628. implementation constant e (called tickadjust in the Unix kernel). The
  629. local clock thus runs at three rates: R, R+e and R-e, so that the
  630. magnitude of correction determines not the magnitude of the rate, but
  631. the length of time over which the rate is continued. Once the correction
  632. has been completed, the clock reverts to rate R and continues
  633. indefinitely at that rate. From the DTS functional specification it
  634. appears that the designers expect that corrections be recomputed on the
  635. order of one every 15 minutes to once per hour.
  636.  
  637. Early in the evolution of NTP the above model was discarded as the
  638. result of experience with sometimes broken servers and always noisy
  639. transmission paths. The factor missing in the DTS design is a capability
  640. to compensate for frequency errors as well as time errors. The NTP
  641. local-clock model includes provisions to estimate the frequency error
  642. and automatically adjust the local clock by introducing additional
  643. offset corrections on a regular basis. This results in much reduced
  644. frequency errors in the order of .01 ppm or a few milliseconds per day
  645. in the absence of external corrections. In principal and depending on
  646. the inherent stability of the local clock, the interval between
  647. corrections can be reduced to the order of hours and even days.
  648.  
  649. However, if some or all of the servers in the synchronization subnet are
  650. to incorporate frequency management, the clock adjustment dynamics must
  651. be controlled and held to specified tolerances; otherwise, some servers
  652. can become unstable and experience wild time and frequency gyrations. In
  653. control theory the DTS design is described as a type-I feedback loop,
  654. which is unconditionally stable, while the NTP design is described as a
  655. type-II loop, which can become unstable under some conditions. This
  656. requires specification of the adjustment rate, including the value of e
  657. for Unix-style clocks, as well as a specified mechanism to adjust the
  658. frequency as required. While this has proved a surmountable problem with
  659. NTP daemons for Unix, it has been suggested that appropriately specified
  660. functionality be incorporated directly into the design of the kernel
  661. timekeeping facility, in which case DTS and possibly other schemes could
  662. benefit as well.
  663.  
  664. For the most accurate and precise time and frequency using ordinary
  665. hardware components it is necessary to fine-tune the adjustment dynamics
  666. to match expected local clock jitter, wander and drift. The NTP model
  667. incorporates this functionality using a drift estimate (kurtosis) which
  668. dynamically adjusts the loop bandwidth. It is arguable whether diligent
  669. pursuit of the highest quality service always justifies the additional
  670. complexity, but it is certainly necessary if accuracies in the order of
  671. a few milliseconds and stabilities in the order of a few milliseconds
  672. per day are required, especially for the primary servers. Since
  673. stability of the subnet itself is not critically dependent on this
  674. feature, it can be considered optional in the specification and
  675. implementation.
  676.  
  677. In point of fact, the local clock model described in the NTP
  678. specification is listed as optional in the same spirit as the model
  679. described in the DTS functional description. As such, the local clock
  680. can in principle be considered implementation specific and not part of
  681. the formal specification. However, as demonstrated above, frequency
  682. compensation requires the local clock adjustment to be carefully
  683. specified and implemented. The NTP mechanism has been carefully
  684. analyzed, simulated, implemented and deployed in the Internet, but DTS
  685. has not. The unavoidable conclusion is that NTP and DTS implementations
  686. cannot safely interoperate in subnets of any size, unless the DTS local
  687. clock adjustment mechanism is suitably modified.
  688.  
  689. 5.2. Monotonicity
  690.  
  691. It is an uncontested fact that computer systems can be badly disrupted
  692. should apparent time appear to warp (jump) backwards, rather than always
  693. tick forward as our universe requires. Both NTP and DTS take explicit
  694. precautions to avoid the local clock running backwards or large warps
  695. when running forwards. However, both NTP and DTS models recognize that
  696. there are some extreme conditions in which it is better to warp
  697. backwards or forwards, rather than allow the adjustment procedure to
  698. continue for an outrageously long time. The local clock is warped if the
  699. correction exceeds an implementation constant, +-128 milliseconds for
  700. NTP and ten minutes for DTS. The large difference between the NTP and
  701. DTS values is attributed to the accuracy models assumed.
  702.  
  703. For most servers and transmission paths in the Internet a offset spike
  704. (following filtering, selection and combining operations) over +-128
  705. milliseconds following filtering, selection and combining operations is
  706. so rare as to be almost negligible. For the few exceptions operating in
  707. extreme dispersive conditions, such as statistical multiplexors or
  708. switched landline/satellite paths, the 128-ms value can be increased by
  709. a configuration parameter. The problem with selecting larger values is
  710. that the time taken to affect a spike correction can be rather long,
  711. during which the clock accuracy specification can be exceeded.
  712. Obviously, the same considerations apply in DTS.
  713.  
  714. 5.3. Epoch Determination
  715.  
  716. The DTS functional specification points out an interesting requirement,
  717. common to other network management and routing protocols, which require
  718. circuit breakers between a set of clocks synchronized to each other but
  719. known to be faulty and another set synchronized to each other but known
  720. to be correct. The problem is to avoid infection of the set of correct
  721. clocks by timestamps from the faulty set. DTS provides this circuit
  722. breaker in the form of an epoch number, which is incremented when a new
  723. subnet is created. Once the first member of the new subnet has been
  724. created, others can be transferred from the faulty to the correct subnet
  725. one at a time so that correctness is preserved.
  726.  
  727. In NTP the circuit breaker is provided by the authentication mechanism,
  728. which can operate with any of several encryption keys. When a new subnet
  729. is created, all that is required is to change the key of a known correct
  730. server and then change the keys of other servers one at a time.
  731. Eventually all servers are running with the new key and the subnet
  732. continues as usual. The same scheme has also been used when testing new
  733. implementations and on occasion to isolate known falsetickers which
  734. cannot otherwise be partitioned from the Internet.
  735.  
  736. 5.4. Dynamic Polling Intervals
  737.  
  738. In both NTP and DTS servers exchange timekeeping data at regular
  739. intervals. In NTP the polling intervals are dynamically adjusted from
  740. about one minute to about 17 minutes, depending on sample dispersion and
  741. local clock stability. In DTS the intervals are fixed, with lower bounds
  742. of two minutes (servers) and 15 minutes (clerks) and upper bounds
  743. depending on error tolerance. Relatively frequent polls are necessary
  744. both to confirm reachability (for hot standby service), as well as to
  745. maintain accuracy within specified limits (DTS) and to maintain optimum
  746. subnet stability (NTP).
  747.  
  748. At the present stage of protocol refinement, NTP polling intervals can
  749. be expected to be somewhat less than DTP intervals. The reason for this
  750. is the emphasis in NTP on the highest attainable accuracy and stability,
  751. which requires compensation for frequency errors as well as timing
  752. errors. Stability of the closed-loop system without bandwidth control
  753. presently requires a maximum polling interval in the order of one minute
  754. for those transmission paths actually used to maintain synchronization;
  755. however, the polling interval is increased typically to 17 minutes for
  756. other paths, which statistically account for more than two-thirds of the
  757. total number of paths. However, with the introduction of bandwidth
  758. control in the latest NTP implementations, the polling interval can be
  759. increased to 17 minutes on all paths, with the expectation of even
  760. larger increases at the higher stratum levels.
  761.  
  762. 6. Summary and Conclusions
  763.  
  764. The service objectives of both NTP and DTS are substantially the same:
  765. to deliver correct, accurate, stable and reliable time throughout the
  766. synchronization subnet. However, as demonstrated in this document, these
  767. objectives are not all simultaneously achievable. For instance, in a
  768. system of real clocks some may be correct according to an established
  769. and trusted criterion (truechimers) and some may not (falsetickers). In
  770. the models used by NTP and DTS the distinction between these two groups
  771. is made on the basis of different clustering techniques, neither of
  772. which is statistically infallible. A succinct way of putting it might be
  773. to say that NTP attempts to deliver the most accurate, stable and
  774. reliable time according to statistical principles, while DTS attempts to
  775. deliver validated time according to correctness principles, but possibly
  776. at the expense of accuracy and stability.
  777.  
  778. In both the NTP or DTS models the problem is to determine which subset
  779. of possibly many clocks represents the truechimers and which do not. An
  780. interesting observation about both NTP and DTS is that neither attempts
  781. to assess the relative importance of misses (mislabelling a truechimer
  782. as a falseticker) relative to false alarms (mislabelling a falseticker
  783. as a truechimer). In signal detection analysis this is established by
  784. the likelihood ratio, with high ratios favoring misses over false
  785. alarms. In retrospect, it could be said that NTP assumes a somewhat
  786. lower likelihood ratio than does DTS.
  787.  
  788. It might be concluded from the discourse in this document that, if the
  789. service objective is the highest accuracy and precision, then the
  790. protocol of choice is NTP; however, if the objective is correctness,
  791. then the protocol of choice is DTS. However, the discussion in Section
  792. 4.2 casts some doubt either on this claim, the DTS functional
  793. specification or this investigator's interpretation of it. It is
  794. certainly true that DTS is "simple" and NTP is "complex," but these are
  795. relative terms and the complexity of NTP did not result from accident.
  796. That even the complexity of NTP is surmountable is demonstrated by the
  797. fact that over 2000 NTP-synchronized servers chime each other in the
  798. Internet now.
  799.  
  800. The most serious departure between NTP and DTS, and the reason that
  801. subnets incorporating large numbers of either protocol can not
  802. interoperate safely without further consideration, is the fact that in
  803. NTP it has been found necessary to implement local clock frequency
  804. compensation and in DTS it has not. Whether or not the additional rigor
  805. in specification and implementation can be justified depends on the
  806. expectation of the time-service customers and their applications.
  807. Frequency compensation not only provides the capability to survive long
  808. server outages while keeping good local time, but is instrumental in
  809. reducing timing noise and maintaining the highest accuracy and
  810. stability.
  811.  
  812. The widespread deployment of NTP in the Internet seems to confirm that
  813. distributed Internet applications can expect that reliable, synchronized
  814. time can be maintained to within about two orders of magnitude less than
  815. the overall roundtrip delay to the root of the synchronization subnet.
  816. For most places in the Internet today that means overall network time
  817. can be confidently maintained to a few tens of milliseconds [MIL90a].
  818. While the behavior of large-scale deployment of DTS in internet
  819. environments is unknown, it is unlikely that it can provide comparable
  820. performance in its present form. With respect to the future refinement
  821. of DTS, should this be considered, it is inevitable that the same
  822. performance obstacles and implementation choices found by NTP will be
  823. found by DTS as well.
  824.  
  825. 7. References
  826.  
  827. [ALL74] Allan, D.W., J.E. Gray and H.E. Machlan. The National Bureau of
  828.      Standards atomic time scale: generation, stability, accuracy and
  829.      accessibility. In: Blair, B.E. (Ed.). Time and Frequency Theory and
  830.      Fundamentals. National Bureau of Standards Monograph 140, U.S.
  831.      Department of Commerce, 1974, 205-231.
  832.  
  833. [BER87] Bertsekas, D., and R. Gallager. Data Networks. Prentice-Hall,
  834.      Englewood Cliffs, NJ, 1987.
  835.  
  836. [DIG89] Digital Equipment Corporation. Digital Time Service functional
  837.      specification, version T1.0.5. Digital Equipment Corporation,
  838.      December 1989.
  839.  
  840. [LIN80] Lindsay, W.C., and A.V. Kantak. Network synchronization of
  841.      random signals. IEEE Trans. Communications COM-28, 8 (August 1980),
  842.      1260-1266.
  843.  
  844. [MAR85] Marzullo, K., and S. Owicki. Maintaining the time in a
  845.      distributed system. ACM Operating Systems Review 19, 3 (July 1985),
  846.      44-54.
  847.  
  848. [MIL85a] Mills, D.L. Algorithms for synchronizing network clocks. DARPA
  849.      Network Working Group Report RFC-956, M/A-COM Linkabit, September
  850.      1985.
  851.  
  852. [MIL85b] Mills, D.L. Experiments in network clock synchronization. DARPA
  853.      Network Working Group Report RFC-957, M/A-COM Linkabit, September
  854.      1985.
  855.  
  856. [MIL89] Mills, D.L. Network Time Protocol (Version 2) specification and
  857.      implementation. DARPA Network Working Group Report RFC-1119,
  858.      University of Delaware, September 1989.
  859.  
  860. [MIL90a] Mills, D.L. On the accuracy and stability of clocks
  861.      synchronized by the Network Time Protocol in the Internet system.
  862.      ACM Computer Communication Review 20, 1 (January 1990), 65-75.
  863.  
  864. [MIL90b] Mills, D.L. Internet time synchronization: the Network Time
  865.      Protocol. IEEE Trans. Communications (to appear). See also: DARPA
  866.      Network Working Group Report RFC-1129, University of Delawary,
  867.      October 1989.
  868.  
  869. [MIL90c] Mills, D.L. The NTP Local-Clock Model and Control Algorithms.
  870.      (unpublished), February 1990
  871.  
  872. [MIT80] Mitra, D. Network synchronization: analysis of a hybrid of
  873.      master-slave and mutual synchronization. IEEE Trans. Communications
  874.      COM-28, 8 (August 1980), 1245-1259.
  875.  
  876. [NBS88] Automated Computer Time Service (ACTS). NBS Research Material
  877.      8101, U.S. Department of Commerce, 1988.
  878.  
  879. [SMI86] Smith, J. Modern Communications Circuits. McGraw-Hill, New York,
  880.      NY, 1986.
  881.  
  882. ------------------------------------------------------------------------
  883.  
  884. Date: Fri, 16 Mar 90 09:58:35 PST
  885. From: comuzzi@took.enet.dec.com
  886. To: mills@udel.edu
  887. Subject: RE: DTS and NTP revisited
  888.  
  889.      ... The Digital Time Service (DTS) for the Digital Network
  890.      Architecture (DECnet) is intended to synchronize time in computer
  891.      networks ranging in size from local to wide-area.
  892.  
  893. You seem to be trying to clothe DTS in a propritary cloth. We now refer
  894. to DECnet as DECnet/OSI since we've incorporated OSI protocols into the
  895. protocol stack. It is our intention to pursue DTS in the OSI standards
  896. forums. As such it is intended to provide service comparable to the
  897. Network Time Protocol (NTP) for the Internet architecture.
  898. While both are clearly addressing the same problem space, DTS and NTP
  899. have VERY different goals. I recently spoke to the president of a time
  900. provider manufacturer and I liked his jargon, he distinguished between
  901. the time-of-day market and the frequency market. The time-of-day market
  902. wants to know what time it is, it is not interested in small errors and
  903. it doesn't want to pay a lot. The frequency market wants stable
  904. frequency sources, needs high stability and is willing to pay.
  905.  
  906. NTP is a solution for the frequency market. DTS is only interested in
  907. the time-of-day market. The major cost for these solutions is not the
  908. initial capital investment, but the long term management and operation
  909. cost. As such DTS has goals of auto-configurability and ease of
  910. management which are not present in NTP.
  911.  
  912.      ... Local clocks are maintained at designated time servers, which
  913.      are timekeeping systems belonging to a synchronization subnet in
  914.      which each server measures the offsets between its local clock and
  915.      the clocks of other servers in the subnet. In this memorandum to
  916.      synchronize frequency means to adjust the clocks in the subnet to
  917.      run at the same frequency, to synchronize time means to set them to
  918.      agree at a particular epoch with respect to Coordinated Universal
  919.      Time (UTC), as provided by national standards, and to synchronize
  920.      clocks means to synchronize them in both frequency and time. The
  921.      goal of a distributed timekeeping service such as NTP and DTS is to
  922.      synchronize the clocks in all participating servers and clients so
  923.      that all are correct, indicate the same time relative to UTC, and
  924.      maintain specified measures of stability, accuracy and reliability.
  925.  
  926. As stated above, DTS is addressing the time-of-day market hence high
  927. frequency stability is an not a goal of DTS.
  928.  
  929.      ... Servers, both primary and secondary, typically run NTP with
  930.      several other servers at the same or lower stratum levels; however,
  931.      a selection algorithm attempts to select the most accurate and
  932.      reliable server or set of servers from which to actually
  933.      synchronize the local clock. The selection algorithm, described in
  934.      more detail later in this document, uses a maximum-likelihood
  935.      clustering algorithm to determine the best from among a number of
  936.      possible servers. The synchronization subnet itself is
  937.      automatically constructed from among the available paths using the
  938.      distributed Bellman-Ford routing algorithm [BER87], in which the
  939.      distance metric is modified hop count.
  940.  
  941. Note that in DTS loops are not a problem, if a system sends out a time
  942. an ultimately gets back a derived time, due to the communication delays
  943. the derived time will always arrive back with a larger inaccuracy. The
  944. only exception to this is the possiblity of a system with a time
  945. provider and a lousy clock. Then the derived time's inaccuracy could be
  946. smaller if the time was parked in a system with a good clock. But in
  947. this case the network clearly has information that the original system
  948. has lost.
  949.  
  950.      ... The NTP specification includes no architected procedures for
  951.      servers to obtain addresses of other servers other than by
  952.      configuration files and public bulletin boards.
  953.  
  954. This is a serious short-coming of NTP and definitely makes it harder to
  955. manage. It is unclear to me why you haven't fixed this since it would
  956. not seem that difficult to store server names in a namespace.
  957. While servers passively respond to requests from other servers, they
  958. must be configured in order to actively probe other servers. Servers
  959. configured as active poll other servers continuously, while servers
  960. configured as passive poll only when polled by another server. There are
  961. no provisions in the present protocol to dynamically activate some
  962. servers should other servers fail.
  963.  
  964. This is harder to fix and interacts with the spanning tree. Here at
  965. least I can see why you didn't make it easier to manage. These problems
  966. make NTP a system administrators nightmare, but are consistent with the
  967. two different sets of goals. Consistent with DTS goals we've accepted
  968. some "clock hopping" in exchange for ease of management.
  969.  
  970.      ... In DTS a synchronization subnet consists of a structured graph
  971.      with nodes consisting of clerks, servers, couriers and time
  972.      providers. With respect to the NTP nomenclature, a time provider is
  973.      a primary server, a courier is a secondary server intended to
  974.      import time from one or more distant primary servers for local
  975.      redistribution and a server is intended to provide time for
  976.      possibly many end nodes or clerks. Time providers, servers and
  977.      couriers are evidently generic, in that all perform similar
  978.      functions and have similar or identical internal structure.
  979.  
  980. Not only are they generic, they are dynamic. If a time provider system
  981. loses its radio signal, it immediately reverts to a server, providing
  982. graceful degradation in the presence of failures.
  983.  
  984.      ... The intent is that time providers can be set from radios,
  985.      telephone calls to NIST [NBS88] or even manually.
  986.  
  987. The DTS story is actually even better here, we provide a well defined
  988. time provider interface. This can be used to implement a time provider
  989. without requiring modification of the protocol portions of the time
  990. service. (On Unix systems it uses Unix domain sockets). This greatly
  991. eases adding a new time provider, and permits time provider vendors to
  992. supply it with their hardware. Note, NTP could (and probably should) do
  993. this also. We have already done it.
  994.  
  995.      As in NTP, DTS clients and servers periodically request the time
  996.      from other servers, although the subnet has only a limited ability
  997.      to reconfigure in the event of failure.
  998.  
  999. I don't understand this statement. Reconfiguration within a LAN is about
  1000. as complete as one could imagine. The random selection of global servers
  1001. is robust against any non-partitioning WAN failures.
  1002.  
  1003.      On local nets DTS servers multicast to each other in order to
  1004.      construct lists of servers available on the local wire. Clerks
  1005.      multicast requests for these lists, which are returned in monocast
  1006.      mode similar to ARP in the Internet. Couriers consult the network
  1007.      directory system to find global time providers. For local-net
  1008.      operation more than one server can be configured to operate as a
  1009.      courier, but only one will actually operate as a courier at a time.
  1010.  
  1011. This is false, I think you're failing to distinguish between couriers
  1012. and backup couriers. There can be more than one courier per LAN, each
  1013. will always synchronize with at least one member of the global set.
  1014. Backup couriers use an election algorithm in the absence of a courier.
  1015. Only one backup courier will be elected to function as a courier.
  1016.  
  1017.      There does not appear to be a multicast function in which a
  1018.      personal workstation could obtain time simply by listening on the
  1019.      local wire without first obtaining a list of local servers.
  1020.  
  1021. That is correct, it would violate the principle that a message exchange
  1022. has to happen in order to correctly assign an inaccuracy.
  1023.  
  1024.      ... Both NTP and DTS exist to provide timestamps to some specified
  1025.      accuracy and precision. NTP represents time as a 64-bit quantity in
  1026.      seconds and fractions, with 32 bits as integral seconds and 32 bits
  1027.      as the fraction of a second. This provides resolution to about 200
  1028.      picoseconds and rollover ambiguity of about 136 years. The origin
  1029.      of the timescale and its correspondence with UTC, atomic time and
  1030.      Julian days is documented in [MIL90c]. DTS represents time to a
  1031.      precision of 100 nanoseconds, although there appears to be no
  1032.      specified maximum value.
  1033.  
  1034. The DTS time is a signed 64 bits of 100 nanoseconds since Oct 15, 1582.
  1035. It will not run out until after the year 30,000 AD. Unlike NTP which
  1036. will run out in 2036. I, for one, intend to still be alive in 2036!
  1037. There are two reasons the 100 ns. was chosen:
  1038.  
  1039. 1) We want to use these timestamps as a time representation, for
  1040.    filesystem timestamps, etc. We REALLY don't want to deal with the
  1041.    problem that our representation is inadequate in some reasonably
  1042.    future time. Also, since the 64 bits is signed, times back to 28,000
  1043.    BC can be represented. This is potentially useful for astronomical
  1044.    data, and happily, includes all of recorded history. If we decreased
  1045.    the resolution, we would give up range. This choice seemed like a
  1046.    reasonable compromise.
  1047.  
  1048. 2) Since we include the the transmission delay in the inaccuracy, 100 ns
  1049.    represents only 30 meters. Its not meaningful to talk about
  1050.    synchronizing clocks below that level with our algorithm. (I believe
  1051.    its not meaningful to talk about synchronizing clocks below that
  1052.    level with NTP either).
  1053.  
  1054. The total timestamp is 128 bits, this includes a four bit version number
  1055. field which would permit these decision to be revisited in the future.
  1056.  
  1057.      ... With respect to applications involving precision time data,
  1058.      such as national standards laboratories, resolutions less than the
  1059.      100 nanoseconds provided by DTS are required. Present timekeeping
  1060.      systems for space science and navigation can maintain time to
  1061.      better than 30 nanoseconds, while range data over interplanetary
  1062.      distances can be determined to less than a nanosecond. While an
  1063.      ordinary application running on an ordinary computer could not
  1064.      reasonably be expected to expect or render precise timestamps
  1065.      anywhere near the 200-picosecond limit of an NTP timestamp, there
  1066.      are many applications where a precision timestamp could be rendered
  1067.      by some other means and propagated via a computer and network to
  1068.      some other place for processing. One such application could well be
  1069.      synchronizing navigation systems like LORAN-C, where the timestamps
  1070.      would be obtained directly from station timekeeping equipment.
  1071.  
  1072. There is an obvious inconsistency in your position here. If you're just
  1073. using the NTP time format for synchronization, then talking about 136
  1074. year rollovers makes some sense. It could be hidden from the users by
  1075. extending the protocol. If, however, as this paragraph implies you
  1076. intend the NTP time format as a general timestamp, then there will be
  1077. extreme pain in the year 2036. (This is refered to in DEC as the
  1078. "date75" problem!) To avoid this without unduly extending the timestamp
  1079. DTS has traded off being able to use its timestamp format for certain
  1080. highly precise applications.
  1081.  
  1082.      NTP specifically and intentionally has no provisions anywhere in
  1083.      the protocol to specify time zones or zone names. The service is
  1084.      designed to deliver UTC seconds and Julian days without respect to
  1085.      geographic position, political boundary or local custom. Conversion
  1086.      of NTP timestamp data to system format is expected to occur at the
  1087.      presentation layer; however, provisions are made to supply leap-
  1088.      second information to the presentation layer so that network time
  1089.      in the vicinity of leap seconds can be properly coordinated. DTS
  1090.      includes provision for time zones and presumably summer/winter
  1091.      adjustments in the form of a numerical time offset from UTC and
  1092.      arbitrary character-string label; however, it is not obvious how to
  1093.      distribute and activate this information in a coordinated manner.
  1094.  
  1095. The information is used only as a help in user displays. That is, an
  1096. application can display BOTH the UTC time and the local time at which a
  1097. timestamp was created. It only cost 12 bits to do this. No use is made
  1098. of the timezone information by DTS or by systems.
  1099.  
  1100.      ... The accuracy and stability expectations of NTP preclude this
  1101.      approach. In NTP the incidence of leap seconds is assumed available
  1102.      in advance at all primary servers and distributed automatically
  1103.      throughout the remainder of the synchronization subnet as part of
  1104.      normal protocol operations. Thus, every server and client in the
  1105.      subnet is aware at the instant the leap second is to take affect,
  1106.      and steps the local clock simultaneously with all other servers in
  1107.      the subnet. Thus, the local clock accuracy and stability are
  1108.      preserved before, during and after the leap insertion.
  1109.  
  1110. Each server has to maintain and propagate this state before the leap
  1111. insertion. This is, of course, subject to Byzantine failures. A failing
  1112. server can insert a bad notification.
  1113.  
  1114.      ... In NTP the roundtrip delay d and clock offset c of server B
  1115.      relative to A is
  1116.  
  1117.                             d = (t4-t1) - (t3-t2)
  1118.                          c = ((t2-t1) + (t3-t4))/2.
  1119.  
  1120.      This method amounts to a continuously sampled, returnable-time
  1121.      system, which is used in some digital telephone networks [LIN80].
  1122.  
  1123. The derivation of the expression for 'c' above assumes the two transit
  1124. delays for this exchange are symmetric. If there are systematically
  1125. asymmetric transmission delays then the NTP algorithm will shift the two
  1126. clocks so that they appear to be synchronized, when in fact they are
  1127. systematically off by some number of milliseconds. The NTP minimum
  1128. filter attempts to minimize this effect assuming that the shortest round
  1129. trip exchange would have to be symmetric or nearly so. Unfortunately
  1130. quite large systematic asymmetric delays can occur for a variety of
  1131. reasons: source-routed networks, broken routing tables, etc. and these
  1132. would apply to all transactions including the shortest. This problem
  1133. exists in DTS also, but in DTS both of the systems will have an
  1134. inaccuracy which encompasses the correct time. That is, DTS will not
  1135. claim to have synchronized clocks to a level which it has not, even in
  1136. the presence of asymmetric delays. NTP can and has.
  1137.  
  1138.      ... Both NTP and DTS have to do a little dance in order to account
  1139.      for timing errors due to the precisions of the local clocks and the
  1140.      frequency offsets (usually minor) over the transaction interval
  1141.      itself. A purist might argue that the expression given above for
  1142.      delay and offset are not strictly accurate unless the probability
  1143.      density functions for the path delays are known, properly convolved
  1144.      and expectations computed, but this applies to both NTP and DTS.
  1145.      The point should be made, however, that correct functioning of DTS
  1146.      requires reliable bounds on measured roundtrip delay, as this
  1147.      enters into the error budget used to construct intervals over which
  1148.      a clock can be considered correct.
  1149.  
  1150. However, this is not at all hard to compute. Simply increase the
  1151. inaccuracy by the potential drift of the local clock during the
  1152. transaction. The architecture specifies this.
  1153.  
  1154.      ... NTP maintains for each server both the total estimated
  1155.      roundtrip delay to the root of the synchronization subnet
  1156.      (synchronizing distance), as well as the sum of the total
  1157.      dispersion to the root of the synchronization subnet (synchronizing
  1158.      dispersion).
  1159.  
  1160. This synchronizing distance has a rather loose definition. I believe the
  1161. current NTP RFC suggests using ten times the mean expected error for the
  1162. synchronizing distance. If this parameter is important to the NTP
  1163. algorithm I would expect some stronger specification. Also, where does
  1164. the value ten come from? I know its experimentally derived and seems to
  1165. work
  1166.  
  1167.      ... These quantities are included in the message exchanges and form
  1168.      the basis of the likelihood calculations. Since they always
  1169.      increase from the root, they can be used to calculate accuracy and
  1170.      reliability estimates, as well as to manage the subnet topology to
  1171.      reduce errors and resist destructive timing loops.
  1172.  
  1173. While you state the synchronizing distance and sychronizing dispersion
  1174. can be used to calculate accuracy, I have never seen a derivation of how
  1175. this could be done. This is one of the recurring points, the lack of
  1176. formal proofs.
  1177.  
  1178.      ... The next step is designed to detect falsetickers or other
  1179.      conditions which might result in gross errors. The pruned and
  1180.      truncated candidate list is re-sorted in the order first by stratum
  1181.      and then by total synchronizing distance to the root; that is, in
  1182.      order of decreasing likelihood. A similar procedure is also used in
  1183.      Marzullo's MM algorithm [MAR85]. Next, each entry is inspected in
  1184.      turn and a weighted error estimate computed relative to the
  1185.      remaining entries on the list. The entry with maximum estimated
  1186.      error is discarded and the process repeats. The procedure
  1187.      terminates when the estimated error of each entry remaining on the
  1188.      list is less than a quantity depending on the intrinsic precisions
  1189.      of the local clocks involved.
  1190.  
  1191. A point which is not discussed here is that when NTP chooses to prune an
  1192. entry, it can not determine if this entry's problem is that it comes
  1193. from a bad clock (falseticker in your jargon), or experienced unusually
  1194. large and asymmetric network delays. The latter case is something to be
  1195. expected in normal operation, the former represents a problem which
  1196. should be fixed. DTS uses the interval information to identify such bad
  1197. clocks, and reports them. Since if a clocks interval doesn't intersect
  1198. the majority it is clearly faulty. This is, of course, a MAJOR issue in
  1199. distributed system management.
  1200.  
  1201.      ... The fundamental assumption upon which the DTS is founded is
  1202.      Marzullo's proof that a set of M clocks synchronized by the above
  1203.      algorithm, where no more than j clocks are faulty, delivers an
  1204.      interval including UTC. The algorithm is simple, both to express
  1205.      and to implement, and involves only one sorting step instead of two
  1206.      as in NTP. However, consider the following scenario with M = 3, j =
  1207.      1 and containing three intervals A, B and C:
  1208.  
  1209.                          A  +--------------------------+
  1210.                          B  +----+
  1211.                          C                        +----+
  1212.      
  1213.  
  1214.                     Result  +-----================-----+
  1215.  
  1216.      Using the algorithm described in the DTS functional specification,
  1217.      both the lower and upper endpoints of interval A are in M-j = 2
  1218.      intervals, thus the resulting interval is coincident with A.
  1219.      However, there remains the interval marked "=" which contains
  1220.      points not contained in at least two other intervals. The DTS
  1221.      document mentions this interesting fact, but makes a quite
  1222.      reasonable choice to avoid multiple intervals in favor of a single
  1223.      one, even if that does in principle violate the correctness
  1224.      assumptions.
  1225.  
  1226. Come on, this in no way violates the correctness assumption. The proofs
  1227. tell us that the correct time is somewhere in the two dashed sub-
  1228. intervals. By making the statement that the time is somewhere in the
  1229. larger interval, a server is making a WEAKER assertion. Marzullo's proof
  1230. would apply and the algorithm would work (sub-optimally) if servers
  1231. arbitrarily lengthened the intervals they computed.
  1232.  
  1233.      ... In point of fact, the local clock model described in the NTP
  1234.      specification is listed as optional in the same spirit as the model
  1235.      described in the DTS functional description. As such, the local
  1236.      clock can in principle be considered implementation specific and
  1237.      not part of the formal specification.
  1238.  
  1239. This is a rather odd statement. What I read is that the local clock
  1240. model is not explicitly required by the NTP documents, but it is, in
  1241. fact, required in functioning implementations.
  1242.  
  1243.      However, as demonstrated above, frequency compensation requires the
  1244.      local clock adjustment to be carefully specified and implemented.
  1245.      The NTP mechanism has been carefully analyzed, simulated,
  1246.      implemented and deployed in the Internet, but DTS has not.
  1247.  
  1248. I have never read a clear specification of the required quality of the
  1249. input time to NTP. However, the following argument shows that in a LAN
  1250. of typical machines, DTS can indeed provide time to NTP. The clock
  1251. resolution of most machines is between 1 and 16.7 milliseconds. Thus,
  1252. any single measurements made by NTP MUST experience this clock jitter.
  1253. NTP can achieve better overall results only by averaging many such
  1254. measurements. We have measured the 'jitter' of DTS times in LANs, it is
  1255. less than 10 milliseconds, so if DTS supplies time to NTP in a typical
  1256. LAN, the NTP will receive time similar in quality to the time it gets
  1257. from other NTP servers. In the WAN case, the jitter may be a problem, I
  1258. assume that to interoperate in the presence of WAN links may require
  1259. clock training.
  1260.  
  1261. If you could provide the derivation of accuracy from synchronization
  1262. distance and synchronization dispersion that you allude to in section
  1263. 4.2, this could form the basis of reliable interoperation with NTP
  1264. supplying time to DTS. Alas, I suspect such a derivation is
  1265. unachievable. However, for installations which are not concerned with
  1266. the DTS guarantee, the time provider interface could be used to import
  1267. NTP time into DTS (just like any time provider, though there would have
  1268. to be a user supplied inaccuracy, based on local experience with NTP).
  1269. We intend to include a sample time provider program to permit this.
  1270.  
  1271.      ... It is an uncontested fact that computer systems can be badly
  1272.      disrupted should apparent time appear to warp (jump) backwards,
  1273.      rather than always tick forward as our universe requires. Both NTP
  1274.      and DTS take explicit precautions to avoid the local clock running
  1275.      backwards or large warps when running forwards. However, both NTP
  1276.      and DTS models recognize that there are some extreme conditions in
  1277.      which it is better to warp backwards or forwards, rather than allow
  1278.      the adjustment procedure to continue for an outrageously long time.
  1279.      The local clock is warped if the correction exceeds an
  1280.      implementation constant, +-128 milliseconds for NTP and ten minutes
  1281.      for DTS. The large difference between the NTP and DTS values is
  1282.      attributed to the accuracy models assumed.
  1283.  
  1284. I believe the difference also comes from different assumptions of the
  1285. risks (and probabilistic costs) involved in jumping the clock. We assume
  1286. it is something you want to do rarely.
  1287.  
  1288.      For most servers and transmission paths in the Internet a offset
  1289.      spike (following filtering, selection and combining operations)
  1290.      over +-128 milliseconds following filtering, selection and
  1291.      combining operations is so rare as to be almost negligible.
  1292.  
  1293. The duplicated text makes me think there is something wrong here, though
  1294. frankly I don't understand what this paragraph is trying to say.
  1295.  
  1296.      ... The service objectives of both NTP and DTS are substantially
  1297.      the same: to deliver correct, accurate, stable and reliable time
  1298.      throughout the synchronization subnet. However, as demonstrated in
  1299.      this document, these objectives are not all simultaneously
  1300.      achievable. For instance, in a system of real clocks some may be
  1301.      correct according to an established and trusted criterion
  1302.      (truechimers) and some may not (falsetickers). the models used by
  1303.      NTP and DTS the distinction between these two groups is made on the
  1304.      basis of different clustering techniques, neither of which is
  1305.      statistically infallible. A succinct way of putting it might be to
  1306.      say that NTP attempts to deliver the most accurate, stable and
  1307.      reliable time according to statistical principles, while DTS
  1308.      attempts to deliver validated time according to correctness
  1309.      principles, but possibly at the expense of accuracy and stability.
  1310.  
  1311. I would claim you're understating DTS's goals of autoconfigurability and
  1312. managablility.
  1313.  
  1314.      In both the NTP or DTS models the problem is to determine which
  1315.      subset of possibly many clocks represents the truechimers and which
  1316.      do not. An interesting observation about both NTP and DTS is that
  1317.      neither attempts to assess the relative importance of misses
  1318.      (mislabelling a truechimer as a falseticker) relative to false
  1319.      alarms (mislabelling a falseticker as a truechimer). In signal
  1320.      detection analysis this is established by the likelihood ratio,
  1321.      with high ratios favoring misses over false alarms. In retrospect,
  1322.      it could be said that NTP assumes a somewhat lower likelihood ratio
  1323.      than does DTS.
  1324.  
  1325. I'm not sure I understand your jargon here. The important trade off for
  1326. DTS is to notify managers of broken clocks (calling a falseticker a
  1327. falseticker) so that it can be fixed. Declaring a good clock bad
  1328. (labeling a truechimer a falseticker) could only occur in DTS as an
  1329. implementation error or as a massive multi-server failure. In either
  1330. case a human will have to get involved.
  1331.  
  1332.      It might be concluded from the discourse in this document that, if
  1333.      the service objective is the highest accuracy and precision, then
  1334.      the protocol of choice is NTP; however, if the objective is
  1335.      correctness, then the protocol of choice is DTS. However, the
  1336.      discussion in Section 4.2 casts some doubt either on this claim,
  1337.      the DTS functional specification or this investigator's
  1338.      interpretation of it.
  1339.  
  1340. I believe you are doing your position a disservice by raising this red-
  1341. herring. No one has found your argument that DTS violates the
  1342. assumptions of Marzullo's thesis convincing. Lamport commented that it
  1343. indicates a serious misunderstanding of Marzullo's proof.
  1344.  
  1345.      It is certainly true that DTS is "simple" and NTP is "complex," but
  1346.      these are relative terms and the complexity of NTP did not result
  1347.      from accident. That even the complexity of NTP is surmountable is
  1348.      demonstrated by the fact that over 2000 NTP-synchronized servers
  1349.      chime each other in the Internet now.
  1350.  
  1351. The ever decreasing cost of time providers argues heavily for a simple
  1352. solution, even though it may require more time providers. It simply
  1353. isn't worth a lot of software complexity, (and maintenance cost, and
  1354. management cost) to avoid spending a few dollars to buy more providers.
  1355. Further, the philosophy of 'correctness' leads to certifiable
  1356. implementation by independent vendors.
  1357.  
  1358.      ... The widespread deployment of NTP in the Internet seems to
  1359.      confirm that distributed Internet applications can expect that
  1360.      reliable, synchronized time can be maintained to within about two
  1361.      orders of magnitude less than the overall roundtrip delay to the
  1362.      root of the synchronization subnet. For most places in the Internet
  1363.      today that means overall network time can be confidently maintained
  1364.      to a few tens of milliseconds [MIL90a]. While the behavior of
  1365.      large-scale deployment of DTS in internet environments is unknown,
  1366.      it is unlikely that it can provide comparable performance in its
  1367.      present form. With respect to the future refinement of DTS, should
  1368.      this be considered, it is inevitable that the same performance
  1369.      obstacles and implementation choices found by NTP will be found by
  1370.      DTS as well.
  1371.  
  1372. I disagree with this final paragraph. I think that NTP and DTS both
  1373. attain their very different goals. Our difference of opinion is in how
  1374. important the different goals are. I accept that DTS will not keep
  1375. clocks quite as tightly synchronized as NTP. It will, however, be a
  1376. product that a vendor can confidently ship to customers who are expected
  1377. to install, configure and manage it themselves.
  1378.  
  1379. ------------------------------------------------------------------------
  1380.  
  1381. Date:     Mon, 19 Mar 90 14:19:44 EST
  1382. From:     Dennis Ferguson <dennis@gw.ccie.utoronto.ca>
  1383. To:  Mills@udel.edu, comuzzi@took.dec.com, elb@mwunix.mitre.org,
  1384. marcus@osf.org
  1385. Subject: Re:  Review and comment on comparison of DTS and NTP
  1386.  
  1387. I have avoided more than a brief comment on DTS since my copy was
  1388. compressed two pages onto a page and then FAXed to a really rotten FAX
  1389. machine here. It is half unreadable, and I have been a little reluctant
  1390. to get involved in this for fear I might attribute to DTS shortcomings
  1391. which are dealt with in the parts I can't read. I don't, however, feel
  1392. my particular concerns about DTS have been adequately dealt with by what
  1393. has passed so far.
  1394.  
  1395. As a consumer of time I care only about results, and what is required of
  1396. me to achieve them. In particular I care about three things: that my
  1397. computer's system clock be as accurate as possible as much of the time
  1398. as possible for a reasonable expenditure of CPU cycles and network
  1399. bandwidth, that I not have to work too hard to achieve this, and that I
  1400. have some way of verifying the truthfulness of the time I am receiving.
  1401. Note that how accurate is "accurate" is hardly quantifiable, the clock
  1402. should provide the time as accurately as is possible within the
  1403. constraints stemming from hardware and network deficiencies. Similarly,
  1404. I would like to do no work to achieve this other than starting a
  1405. program. The "truthfulness" part is important since one of the major
  1406. application groups which will require time synchronization will no doubt
  1407. be authentication protocols (e.g. SNMP authentication, and Kerberos to
  1408. some degree) and I don't want to leave a hole for attacking these
  1409. through the time protocol.
  1410.  
  1411. In this light I'd like to make some comments on the recent round of
  1412. debate concerning DTS versus NTP.
  1413.  
  1414.      NTP is a solution for the frequency market. DTS is only interested
  1415.      in the time-of-day market. The major cost for these solutions is
  1416.      not the initial capital investment, but the long term management
  1417.      and operation cost. As such DTS has goals of auto-configurability
  1418.      and ease of management which are not present in NTP.
  1419.  
  1420. This is blatantly misleading. NTP is more accurate than DTS because it
  1421. includes computational machinery to condition the local clock, which DTS
  1422. lacks. DTS includes a sub-protocol for autoconfiguring a large portion
  1423. of the synchronization subnet, NTP does not (or at least not on the
  1424. scale of DTS). All this is true.
  1425.  
  1426. What is misleading is the strong implication that these issues are
  1427. somehow related. They are completely and utterly orthogonal. NTP could
  1428. be enhanced with an auto-configuration protocol, and indeed could use a
  1429. variant of DTS' scheme, without affecting the precision it achieves one
  1430. wit. Similarly, DTS' omission of the local clock machinery was in no way
  1431. necessitated by its ability to auto-configure, nor any other aspect of
  1432. the protocol which I can fathom. DTS just left this part out, and as a
  1433. consequence is sloppier.
  1434.  
  1435. The "time-of-day market" versus "frequency market" analogy is hence
  1436. quite faulty, I think. I can see no cost at all associated with NTP's
  1437. precision, perhaps other than requiring additional work on the part of
  1438. the implementer of the software.
  1439.  
  1440.      As stated above, DTS is addressing the time-of-day market hence
  1441.      high frequency stability is an not a goal of DTS.
  1442.  
  1443. Again, this is so silly. As far as I can see, DTS has gained exactly
  1444. nothing by leaving out the local clock conditioning code, but has lost
  1445. an order of magnitude or more in accuracy under normal conditions and
  1446. several orders of magnitude should the subnet partition and cause loss
  1447. of reachability of the radio clock servers. Just saying this "is not a
  1448. goal of DTS" with the "time-of-day market" irrelevancy thrown in does
  1449. not make this reasonable.
  1450.  
  1451. This from Dave Mills, followed by Joe Comuzzi, followed by Dave Mills:
  1452.  
  1453.           There does not appear to be a multicast function in which a
  1454.           personal workstation could obtain time simply by listening on
  1455.           the local wire without first obtaining a list of local
  1456.           servers.
  1457.  
  1458.      That is correct, it would violate the principle that a message
  1459.      exchange has to happen in order to correctly assign an inaccuracy.
  1460.  
  1461.           There appears to be a considerable Internet constituency which
  1462.           has noisily articulated the need for a multicast function when
  1463.           the number of clients on the wire climbs to the hundreds.
  1464.           Having responded to the articulation noise, I thought it might
  1465.           be a reasonable idea to include this capability (so far
  1466.           untested) on LANs with casual workstations, promiscuous
  1467.           servers and simple protocol stacks.
  1468.  
  1469. This capability is certainly not untested. My NTP daemon does
  1470. multicasting, and I synchronize about 80 machines here this way (I also
  1471. note that 8/9ths of the computers which make up the NSFnet backbone are
  1472. also time synchronized with broadcast NTP. I have no idea how many other
  1473. users there are). The clients which are synchronized this way require no
  1474. configuration and, indeed, the scheme scales well since I could
  1475. synchronize 100's of machines this way at no additional expense. The NTP
  1476. clock filter is adaptable for use with one-way time, the selection
  1477. algorithms continue to work as always, and systematic time skews between
  1478. machines with precise clocks are on the order of a few milliseconds (and
  1479. stably so. This is NTP, after all). Truthfully, while I like the DTS
  1480. approach to clock combination, I'm not sure I care about knowing the
  1481. inaccuracy enough to miss knowing it on hosts at the bottom of the
  1482. synchronization tree. Multicast time seems to me to be a feature the
  1483. "time-of-day market" could truly make good use of.
  1484.  
  1485.      The DTS time is a signed 64 bits of 100 nanoseconds since Oct 15,
  1486.      1582. It will not run out until after the year 30,000 AD. Unlike
  1487.      NTP which will run out in 2036. I, for one, intend to still be
  1488.      alive in 2036!
  1489.  
  1490. Note that this comment is only relevant if one requires that time stamps
  1491. for long lived things like files be identical to timestamps used by the
  1492. time synchronization protocol. I see no reason to require this, about
  1493. the only thing you save are a couple of conversion routines. If this
  1494. isn't a requirement then the only thing NTP has to worry about are
  1495. packets which spend more than 136 years in transit, and that there be
  1496. some external time source which allows you to determine the time-of-day
  1497. to within 68 years before running the protocol. I can't get too excited
  1498. about this.
  1499.      2) Since we include the the transmission delay in the inaccuracy,
  1500.         100 ns represents only 30 meters. Its not meaningful to talk
  1501.         about synchronizing clocks below that level with our algorithm.
  1502.         (I believe its not meaningful to talk about synchronizing clocks
  1503.         below that level with NTP either).
  1504.  
  1505. I have some 68000-based hardware with microsecond system clocks which
  1506. have an on-time second output I can look at with an oscilloscope, or
  1507. plot on a chart recorder. The clocks have ovenized crystal oscillators.
  1508. I see synchronization between the machines, via NTP across an ethernet,
  1509. on the order of 50-75 us (after calibrating out systematic asymmetric
  1510. delays in the code). This is hardly trying, either. I don't think 100 ns
  1511. is particularly small. GPS can give me UTC more precisely than that, I
  1512. don't think it unreasonable to expect time synchronization protocols to
  1513. be prepared to move time with precisions I can get today, let alone 20
  1514. years from now.
  1515.  
  1516. From Dave Mills, followed by Joe Comuzzi:
  1517.  
  1518.           Both NTP and DTS have to do a little dance in order to account
  1519.           for timing errors due to the precisions of the local clocks
  1520.           and the frequency offsets (usually minor) over the transaction
  1521.           interval itself.
  1522.  
  1523.      However, this is not at all hard to compute. Simply increase the
  1524.      inaccuracy by the potential drift of the local clock during the
  1525.      transaction. The architecture specifies this.
  1526.  
  1527. What bugs me about this is that increasing the inaccuracy by the
  1528. potential drift (it appears to me the latter must be configured as well,
  1529. since DTS doesn't seem to include any machinery to determine it on the
  1530. fly. DTS may not be quite as "manageable" as one might believe) may make
  1531. the protocol work nicely, but doesn't do a damn thing for the precision
  1532. of my drifting system clock. The latter is what I'm paying for a time
  1533. synchronization protocol for, the fact that DTS can tell me it is doing
  1534. a bad job by giving me error bounds doesn't excuse the fact that it is
  1535. doing a bad job.
  1536.  
  1537. It appears to me that the NTP local clock code is a natural for DTS. It
  1538. avoids having to configure an expected drift to get a realistic
  1539. estimate. It essentially reduces the drift by more than an order of
  1540. magnitude. Since the local clock algorithm is analitically well defined
  1541. it should be quite possible to have it produce a meaningful inaccuracy
  1542. for use by the protocol automatically (the compliance estimate is close
  1543. already). The inclusion of the local clock conditioning code would
  1544. affect little else that I can see. Why didn't DTS include it?
  1545.  
  1546.      A point which is not discussed here is that when NTP chooses to
  1547.      prune an entry, it can not determine if this entry's problem is
  1548.      that it comes from a bad clock (falseticker in your jargon), or
  1549.      experienced unusually large and asymmetric network delays. The
  1550.      latter case is something to be expected in normal operation, the
  1551.      former represents a problem which should be fixed. DTS uses the
  1552.      interval information to identify such bad clocks, and reports them.
  1553.      Since if a clocks interval doesn't intersect the majority it is
  1554.      clearly faulty. This is, of course, a MAJOR issue in distributed
  1555.      system management.
  1556.  
  1557. The possibility of separating broken clocks from broken networks is a
  1558. neat feature of DTS' approach, and one much to be desired. I covet this
  1559. ability. But why, oh why, was local clock conditioning ignored and the
  1560. accuracy of the system clock compromised? I covet the latter more
  1561. intensely, and can't understand why I can't have both.
  1562.  
  1563.      I have never read a clear specification of the required quality of
  1564.      the input time to NTP. However, the following argument shows that
  1565.      in a LAN of typical machines, DTS can indeed provide time to NTP.
  1566.      The clock resolution of most machines is between 1 and 16.7
  1567.      milliseconds. Thus, any single measurements made by NTP MUST
  1568.      experience this clock jitter. NTP can achieve better overall
  1569.      results only by averaging many such measurements. We have measured
  1570.      the 'jitter' of DTS times in LANs, it is less than 10 milliseconds,
  1571.      so if DTS supplies time to NTP in a typical LAN, the NTP will
  1572.      receive time similar in quality to the time it gets from other NTP
  1573.      servers. In the WAN case, the jitter may be a problem, I assume
  1574.      that to interoperate in the presence of WAN links may require clock
  1575.      training.
  1576.  
  1577. It is incorrect that the NTP local clock must experience a jitter of the
  1578. magnitude of the precision of the remote machine's clock, since this
  1579. data is passed through the filter algorithm before it reaches the clock.
  1580.  
  1581. What mystifies me is where the 10 milliseconds comes from and how this
  1582. is typical. I am on thin ice here, but let me expose my ignorance by
  1583. making some assertions based on what I can decode from the DTS spec. DTS
  1584. seems to be designed to deal with clock drifts in the 100 ppm ballpark.
  1585. It appears to me that the clock is updated once in 15 minutes (??).
  1586. Without clock conditioning, this would imply that a DTS synchronized
  1587. clock may jitter by 90 ms over the update period, and that on average
  1588. the clock will be 45 ms off (this may be incorrect, but I see nothing at
  1589. all in there which compensates for drift with predictive adjustments).
  1590.  
  1591. This is what is alarming, an NTP-corrected clock likely won't drift by
  1592. 90 ms if left without synchronization for 2 or 3 days, and under normal
  1593. operation when synchronized across a LAN will on average be right dead
  1594. on (or, at least, show systematic offsets in the sub-milliseconds which
  1595. are more related to code path lengths and such). There is no reason why
  1596. DTS couldn't match this performance.
  1597.  
  1598. Now, either your 10 ms implies that the "typical" clock you tested with
  1599. had an inherent drift of less than 10 ppm, or that I am grossly mistaken
  1600. and the clock update interval is more like a minute-and-a-half (implying
  1601. a lot of traffic?). If the latter is true, I apologize. If the former is
  1602. true, however, I would suggest you may be in for a big shock when you
  1603. try to run your protocol in the "real world". From data taken from about
  1604. 275 machines which run NTP here, we see an *average* drift of 30 ppm
  1605. slow, with quite a large standard deviation. Fully 5% of those machines
  1606. have drift rates greater than the 100 ppm (I note that none of these are
  1607. built by DEC, which may be why DTS has a more optimistic view of the
  1608. world). There are six workstations in the room next door which drift at
  1609. a rate of 300-350 ppm fast. NTP handles all of these (though it was
  1610. helped with the 300 ppm stations by some priming), and the local clock
  1611. effectively reduces the drift rate to a ppm or less in almost all cases.
  1612. DTS leaves this part grossly underengineered.
  1613.  
  1614.           It is an uncontested fact that computer systems can be badly
  1615.           disrupted should apparent time appear to warp (jump)
  1616.           backwards, rather than always tick forward as our universe
  1617.           requires.
  1618.  
  1619.      I believe the difference also comes from different assumptions of
  1620.      the risks (and probabilistic costs) involved in jumping the clock.
  1621.      We assume it is something you want to do rarely.
  1622.  
  1623. Both Dave and Joe miss a fundamental point here. There is nothing in the
  1624. NTP spec which requires the system clock (as opposed to NTP's local
  1625. clock) to step into a +-128 ms window, or a +-512 ms window, or into a
  1626. 15 minute window for that matter. NTP need never step the system clock
  1627. backwards. There is a compilation option to my daemon which causes it to
  1628. slew the system clock under all conditions, as this closes a hole when
  1629. used with Kerberos. The performance when done this way is very nearly
  1630. identical to the performance when the system clock is allowed to step.
  1631. NTP's stepping of the system clock is an absolute non-issue, it can do
  1632. it any way you prefer.
  1633.  
  1634.           A succinct way of putting it might be to say that NTP attempts
  1635.           to deliver the most accurate, stable and reliable time
  1636.           according to statistical principles, while DTS attempts to
  1637.           deliver validated time according to correctness principles,
  1638.           but possibly at the expense of accuracy and stability.
  1639.  
  1640.      I would claim you're understating DTS's goals of
  1641.      autoconfigurability and manageability.
  1642.  
  1643. I would claim that all of the above is misleading.
  1644.  
  1645. (1) There is no reason that I can see why DTS' accuracy and stability
  1646.     couldn't be improved to NTP levels without violating correctness
  1647.     principles. Indeed, such an enhancement could only improve DTS'
  1648.     error bound estimate since it seems to me the local clock could be
  1649.     used to automatically produce estimates of things that need to be
  1650.     configured now.
  1651.  
  1652. (2) NTP's accuracy and stability in no way preclude additions to the
  1653.     protocol to ease configuration and management. The latter just
  1654.     hasn't been done yet.
  1655.  
  1656. (3) DTS' autoconfigurability and manageability have nothing to do with
  1657.     its ability to achieve NTP's level of performance, or lack thereof.
  1658.     The computational machinery required to do the latter was omitted
  1659.     for no good reason that I can see.
  1660.  
  1661.      The ever decreasing cost of time providers argues heavily for a
  1662.      simple solution, even though it may require more time providers. It
  1663.      simply isn't worth a lot of software complexity, (and maintenance
  1664.      cost, and management cost) to avoid spending a few dollars to buy
  1665.      more providers. Further, the philosophy of 'correctness' leads to
  1666.      certifiable implementation by independent vendors.
  1667.  
  1668.           I continue to believe it is not constructive to "certify
  1669.           correctness" in probabilistic systems, only to exchange
  1670.           acceptable tolerance bounds for acceptable error bounds. If by
  1671.           "time providers" you imply each is associated with a radio
  1672.           clock, I do not think it likely that the cost of a radio clock
  1673.           will plummet to the point that every LAN can afford one and,
  1674.           even if it did, you can not trust a single radio. You have to
  1675.           have more than one of them and, preferably, no common point of
  1676.           failure between them.
  1677.  
  1678. I find myself in agreement, and disagreement, with both of these points
  1679. of view. I am personally a believer that every LAN should have a "time
  1680. provider" or three, and that the only thing which prevents this from
  1681. happening is a chicken-and-egg problem (radio clocks are low volume
  1682. items and hence are expensive. Radio clocks are expensive, so not a lot
  1683. of people want to buy them).
  1684.  
  1685. Again and again, however, the issue of the maintenance and management
  1686. cost versus performance tradeoff rears its ugly head. *There* *is* *no*
  1687. *such* *tradeoff*, the issues are orthogonal. Moreover, since the local
  1688. clock processing is utterly divorced from the rest of the protocol, and
  1689. since NTP's local clock is far and away the part of the spec most
  1690. solidly supported by analysis, I can see no reason whatsoever that its
  1691. inclusion in DTS would affect one's ability to produce certifiable
  1692. implementations in any way.
  1693.  
  1694.           ... The widespread deployment of NTP in the Internet seems to
  1695.           confirm that distributed Internet applications can expect that
  1696.           reliable, synchronized time can be maintained to within about
  1697.           two orders of magnitude less than the overall roundtrip delay
  1698.           to the root of the synchronization subnet. For most places in
  1699.           the Internet today that means overall network time can be
  1700.           confidently maintained to a few tens of milliseconds [MIL90a].
  1701.           While the behavior of large-scale deployment of DTS in
  1702.           internet environments is unknown, it is unlikely that it can
  1703.           provide comparable performance in its present form. With
  1704.           respect to the future refinement of DTS, should this be
  1705.           considered, it is inevitable that the same performance
  1706.           obstacles and implementation choices found by NTP will be
  1707.           found by DTS as well.
  1708.  
  1709.      I disagree with this final paragraph. I think that NTP and DTS both
  1710.      attain their very different goals. Our difference of opinion is in
  1711.      how important the different goals are. I accept that DTS will not
  1712.      keep clocks quite as tightly synchronized as NTP. It will, however,
  1713.      be a product that a vendor can confidently ship to customers who
  1714.      are expected to install, configure and manage it themselves.
  1715.  
  1716. Again the implication that a time protocol which is configurable and
  1717. manageable cannot be precise. It is not that DTS cannot be precise, it
  1718. is that it is not precise. I still have yet to see even one clear,
  1719. understandable advantage which has been gained by not making DTS
  1720. precise.
  1721.  
  1722. If I had to choose, I'd send both protocols back to the drawing board
  1723. for further revision. NTP badly needs some work done in the area of
  1724. auto-configuring large synchronization subnets, since this can be
  1725. painful. DTS compromises its precision by ignoring relatively simple,
  1726. straight forward, analitically sound techniques for improving the
  1727. behaviour of the local clock, a deficiency which buys it nothing in
  1728. other areas that I can see.
  1729.  
  1730. DTS' "correctness" philosophy is truly attractive to me. If we were
  1731. comparing paper protocols I would rate DTS a hands down winner. The
  1732. thing is, "correctness" carries less weight with me in the comparison to
  1733. NTP since NTP is a protocol derived from long practical experience and
  1734. which is known to work well in the real world. Unless I am
  1735. misunderstanding something (a distinct possibility), the "10 ms typical"
  1736. problem may indicate that DTS' idea of what the world is like might not
  1737. be based on wide experience. I like DTS, though. I just wish the
  1738. spurious omission of computational machinery to deal properly with the
  1739. local clock were fixed before international standardhood forces sloppy
  1740. timekeeping (or, at least, a lot sloppier than it has any good reason to
  1741. be) on us all.
  1742.  
  1743. The only other concern I had was related to authentication. I just
  1744. wanted to make sure either that DTS was only being targetted for the OSI
  1745. environment or that it was carrying over all the related authentication
  1746. baggage required into the Internet environment. Given the dependence of
  1747. other Internet protocols' authentication schemes on the security (and
  1748. synchronization, even) of the system clock, I think an Internet time
  1749. protocol which lacks authentication will be unusable in a rapidly
  1750. growing number of situations (of course, NTP could really use some help
  1751. in the area of key management, regardless).
  1752.  
  1753. ------------------------------------------------------------------------
  1754.  
  1755. Date: Wed, 21 Mar 90 14:10:08 PST
  1756. From: comuzzi@took.enet.dec.com
  1757. To: mills@udel.edu
  1758. Subject: I've sent this to everyone else, yours bounced because of a
  1759. typo.
  1760.  
  1761. This is a note to continue the DTS/NTP comparison, because I too am
  1762. finding this conversation fruitful. Dennis, I would be glad to mail you
  1763. a copy of the DTS architecture if you want one. (and Dave, I've even
  1764. changed the cover and introduction).
  1765.  
  1766. I'd like to address some of the issues Dennis raised. I'll save his
  1767. major point, about accuracy and ease-of-managment being orthogonal, for
  1768. last. Allow me to start with the decision of DTS not to support a
  1769. multicast mode. One reason was that protocols which multicast the time
  1770. will be subject to Byzantine failures. (Clearly anyone can just
  1771. multicast any time they want. This problem does not occur with using
  1772. multicast to locate the servers in the DTS architecure, multiple servers
  1773. would have to be co-opted.) The second point, the one I was trying to
  1774. raise in my reply to Dave, was that it was DTS's intention to have the
  1775. time and interval information available on every node. The hope was that
  1776. this would permit the proliferation of applications and algorithms which
  1777. used the DTS guarantee (that UTC is contained in the interval). Clearly,
  1778. until such a facility is available on every system, few are going to
  1779. spend a lot of time exploring such issues. One such application is in
  1780. DECnet/OSI phase V management. Events are logged with their time and
  1781. inaccuracy. This permits a network admistrator to examine log entries
  1782. and determine that one event could not have caused a second event (if,
  1783. for instance, the interval of the first event doesn't overlap and is
  1784. later than the second.) Obviously this requires the inaccuracy to be
  1785. available on every source of events, that is, every node. The third
  1786. point I'd like to discuss refers to Dave's statement about a
  1787. "considerable Internet constituency which has noisily articulated the
  1788. need for a multicast function when the number of clients on the wire
  1789. climbs to the hundreds." Is it that they wanted multicast? Or was the
  1790. real objection the practical difficulty of adding a second server to a
  1791. LAN of 300 nodes and then having to change the server entry in 150
  1792. ntp.conf files to redistribute the load? (This is a concrete example of
  1793. why I claim NTP is a system admistrator's nightmare. However, my real
  1794. interest in this discussion is to separate the problem 
  1795. (autoconfiguration) from the particular solution that was chosen
  1796. (multicast the time), and to understand what the motivation of the
  1797. Internet community was.) Clearly DTS responds to the autoconfiguration
  1798. problem, but if the requirement really was that they didn't want to add
  1799. that additional server at all then a multicast scheme is probably the
  1800. only solution. However, one should be clear about what is being traded-
  1801. off, a multicast solution will manifestly have Byzantine failures. I
  1802. think this difference is an interesting one and would like to have more
  1803. discussions about it.
  1804.  
  1805. The next topic I'll discuss is the area of the DTS architecture I
  1806. personally believe is least likely to survive the standardization
  1807. process unchanged: The timestamp format. I think we have much agreement
  1808. here. I defended the 100 nanosecond resolution of the DTS timestamp,
  1809. though I'm not particularly happy with it either. I do think it would be
  1810. a win if the network timestamp format equaled the internal timestamp
  1811. format, which argues that the network time format wants to be long
  1812. lived. Even if this argument is rejected, however, there is still a
  1813. price to be paid when the network timestamp runs out - implementations
  1814. which haven't added the rollover code will be unable to operate. The
  1815. question here is how low-level, pervasive and long-lived network nodes
  1816. might become (I've heard suggestions of putting the OSI protocol stack
  1817. in a thermostat, I suppose it could happen.) It's true that sitting here
  1818. today, it's hard to imagine that any code I write will still be
  1819. executing in 2036, butif I were blasting it into ROM I'd be less sure
  1820. about that. I guess I'm also attracted to Dave's suggestion of using
  1821. Julian Day numbering and fractions within the Julian Day, though when I
  1822. try to plug in the numbers and actually design the timestamp I'm forced
  1823. to conclude the total timestamp would have to be a bit bigger. Since
  1824. I've already heard grumbling about the size of DTS's 128 bit timestamp,
  1825. I guess I'll have to think about this further.
  1826.  
  1827. There has been a fair amount of discussion about interoperation of the
  1828. two time services. Let me try to clarify what I said (too tersely) in my
  1829. original response to Dave's paper. There are three separate cases I'd
  1830. like to distinguish
  1831.  
  1832.      A) An isolated group of DTS systems which obtain time from NTP
  1833.      B) An isolated group of NTP systems which obtain time from DTS.
  1834.      C) A collection of DTS and NTP giving time to each other.
  1835.  
  1836. I believe that without fairly major changes in one or both of the
  1837. architectures case C is a problem, however it is an easily prevented
  1838. problem (see below). Cases A and B however are very interesting, useful
  1839. and I claim easily achievable.
  1840.  
  1841. NTP giving time to DTS would make sense in environments where DTS
  1842. systems are being added to LANs where there is no local time provider
  1843. and there is a pre-existing NTP infastructure. The model for how to do
  1844. this would be to use the DTS time provider interface to import the NTP
  1845. time. Comparison of DTS timestamps within the DTS group would work
  1846. normally; there would, however, be some risk of getting an incorrect
  1847. result if timestamps of two such groups were intercompared. This risk
  1848. can be managed though, the interoperation would require the user specify
  1849. an inaccuracy for the NTP time based on the local experience with NTP,
  1850. the obvious choice would be some multiple of the synchronization
  1851. distance - the more risk adverse the larger the multiple. This would (at
  1852. low probability) violate the DTS correctness philosophy. If you want
  1853. certainty, buy two hardware time providers per LAN. Note, however, a
  1854. reasonable compromise would be one hardware time provider and an NTP
  1855. time provider. The DTS fault detection would check the hardware against
  1856. NTP and complain when there was a discrepancy.
  1857.  
  1858. Case B corresponds to situations where a DTS infastructure exists (or is
  1859. being added) and there is a need to deliver time to systems using NTP.
  1860. This is the situation I was talking about in my response to Dave. I made
  1861. several assumptions, which I didn't make clear. I assumed that the
  1862. gateway would be both a DTS server and an NTP server, that the NTP code
  1863. would be operating in the "don't change the clock" mode (In the U or
  1864. Maryland implementation this is the -s option, I'm told Dennis's
  1865. implementation has an option in the ntp.conf file to do the same thing.)
  1866. and that the NTP clients were on the same LAN. DTS servers synchronize
  1867. with each other at two minute intervals (Note this is server to server -
  1868. clients synchronize at 15 minute intervals. This is Dennis's question.)
  1869. Now, I'm not claiming that "the NTP local clock must experience a jitter
  1870. of the magnitude of the precision of the remote machine's clock," what I
  1871. am claiming is that in normal NTP operation the input data to the NTP
  1872. filtering algorithm must experience a jitter of the magnitude of the
  1873. precision of the remote machine's clock. This is the same magnitude as
  1874. the jitter of the DTS managed clock. I have conducted experiments with
  1875. this configuration and haven't experienced any wild instabilities.
  1876. Again, NTP timestamps generated in two such groups will not be
  1877. intercomparable with each other to the level that they would if the time
  1878. was being delivered by NTP all the way. Currently however, no
  1879. application can be algorithmicly depending on distributed time derived
  1880. from NTP unless the algorithm contains a parameter which says "times
  1881. closer together then this will be assumed unordered", that is, unless
  1882. the algorithm imputes an inaccuracy to the NTP time.
  1883.  
  1884. Case C potentially breaks the invariants of both protocols. The DTS
  1885. invariant is that UTC is contained within the interval. The NTP
  1886. invariant (I'm less sure of my statement here) is that the frequency of
  1887. good servers agree with UTC. NTP has a further invariant, that there are
  1888. no loops in the time distribution network. This is enforced by the
  1889. stratum. Clearly if DTS took time from a collection of NTP servers and
  1890. later gave it back to the same collection of servers, a loop could and
  1891. probably would occur. There is a simple method to prevent this, I
  1892. propose that the gateway described in case B above always declare itself
  1893. to be at some fairly high (numerically large) stratum. Potential clients
  1894. will ignore the DTS/NTP server in favor of servers which obtained their
  1895. time exclusively via NTP (and have much lower stratum numbers). I'm
  1896. assuming that the NTP implementation at the gateway can be coerced into
  1897. using a fixed stratum and would propose a value of 16 for this purpose.
  1898. There's also a stratum zero which is supposed to be used when the
  1899. stratum is unknown, however I'm not sure I understand what value servers
  1900. which obtain their time from a stratum zero server will use. Do they use
  1901. zero? If so, how are loops prevented amongst themselves?
  1902.  
  1903. A few nits before we get to the meat of the discussion. Dennis is
  1904. concerned that the drift has to be input as a management parameter. I'll
  1905. show my vendor colors here and say this isn't a management parameter but
  1906. an implementation detail. The assumption is that when DTS is shipped to
  1907. you from your hardware or software vendor, the drift has been
  1908. autoconfigured. That is, a good implementation of the DTS architecture
  1909. would know the maximum drift rate for the machines that the
  1910. implementation has been certified on. Until some sort of architecture
  1911. neutral distribution format (OSF is attempting to settle on such an
  1912. ANDF) is created this is really easy to do - Just hard code in the value
  1913. that's appropriate for the given processor family. If there's wide
  1914. variation within the processor family (or if there are multiple
  1915. processor families due to an ANDF), you'll have to code a table. About
  1916. the only case where the user would have to enter it is where he's
  1917. created his own custom hardware configuration. I guess that doesn't
  1918. bother me.
  1919.  
  1920. The second nit has to do with DTS's treatment of leap seconds. I appear
  1921. not to have been clear here. Dave's original document was basically
  1922. correct in its description of how DTS handles leap seconds - Servers
  1923. increase their inaccuracy at the month boundary and a time provider
  1924. narrows the interval later. When I wrote: "Each server has to maintain
  1925. and propagate this state before the leap insertion. This is, of course,
  1926. subject to Byzantine failures. A failing server can insert a bad
  1927. notification." I was describing my understanding of (and a problem with)
  1928. NTP's leap second handling. If my understanding of NTP is incorrect, I
  1929. apologize, but the Byzantine problem seems real to me.
  1930.  
  1931. In my reply to Dave I stated "DTS will not claim to have synchronized
  1932. clocks to a level which it has not, even in the presence of asymmetric
  1933. delays. NTP can and has." Dave correctly points out that "NTP does not
  1934. claim to have synchronized to any level, only to minimize the level of
  1935. probablistic uncertainty and estimate the error incurred." I retract the
  1936. last sentence. What I was trying to say is that DTS makes it clear to
  1937. the user he could be losing in this way, while NTP does not make it
  1938. clear.
  1939.  
  1940. Dave asked if I am in substantial agreement with the statistical models
  1941. presented in his first document. I agree with most of this section. My
  1942. only significant disagreement is with the last paragraph. It is true
  1943. that DTS assumes that a system's clock drifts at a rate less than its
  1944. manufacture's specification, and that a hardware time provider operates
  1945. within specification. The probablities of these assumption being false
  1946. are on the order of magnitude of other hardware failures. Software
  1947. implementation do not routinely checksum memory any more (and they
  1948. certainly don't do it to find memory errors). Violations of these
  1949. assumptions represent faults, just as real as processor faults, and
  1950. should be fixed. Note the long tails you observe in the distributions in
  1951. the Internet are on message transmission times and the like. These
  1952. parameters are dynamically measured in the DTS algorithm. Wick Nichols
  1953. stated: "DTS is willing to accept historical estimates of the
  1954. probability that a clock will go faulty (with checks for faultiness),
  1955. but is not willing to accept historical estimates of current network
  1956. characteristics." in his discussion of this point for the OSF.
  1957.  
  1958. Dennis asked a question about DTS authentication in the Internet
  1959. environment. What I personally would like to see is an implementation of
  1960. DTS using Apollo's NCS which in turn used Kerberos authentication. This
  1961. is basically what Digital has proposed to the OSF in response to their
  1962. distributed computing request for technology.
  1963.  
  1964. Now to the major contention of Dennis's review, that accuracy and ease-
  1965. of-management are "completely and utterly orthogonal". I disagree with
  1966. this less then a reader of my response to Dave might think, though I am
  1967. somewhat in disagreement with it. What I hold is that ease-of-
  1968. management, provablility and accuracy for a time service are all
  1969. interrelated. I believe that ease-of-management is something that must
  1970. be engineered into a system from the start, it can't be tacked on as an
  1971. afterthought. Further, I believe simple systems are easier to manage
  1972. then complex systems. The failure modes that Murphy can find in complex
  1973. systems are just so much more (for lack of a better word) complex. Now,
  1974. much of DTS ease-of-management derives from its autoconfiguration, the
  1975. autoconfiguration is, in turn, dependent on the (relative lack of)
  1976. configuration rules, that is, that synchronizing any two servers just
  1977. works and cannot lead to instabilities. The problem with just adding the
  1978. NTP local clock model to DTS (as I understand the NTP local clock model)
  1979. is that the resulting system could have wild instabilities. (Maybe my
  1980. understanding of NTP is incorrect here.) The dynamic nature of the DTS
  1981. autoconfiguration rules (couriers choosing a random member of the global
  1982. set for instance) means the the input time driving the local clock model
  1983. will have what Dave calls "phase noise". As I understand NTP's local
  1984. clock model this is where the instability creeps in. Further, the
  1985. existing NTP protocol avoids loops by using a stratum concept, again the
  1986. DTS autoconfiguration happily produces loops. As I noted previously this
  1987. doesn't effect the DTS algorithm, but they would cause havoc for NTP.
  1988. Again one could add complexity to the DTS algorithm to prevent the
  1989. loops, but I claim one would pay a price in system management cost.
  1990. Another problem (according to Dave) is that the resultant phase locked
  1991. loops have to be analyzed in the light of assumed probability
  1992. distributions, etc. and one does not end up with the sort of proofs of
  1993. correctness that are what is liked in DTS. There is one interesting
  1994. aside on this last point. I believe there is a way one could add clock
  1995. training to the DTS model and preserve the correctness. If the training
  1996. algorithm decides to change the rate of the clock by some amount,
  1997. *increase* the maximum drift rate by that amount. I believe this can be
  1998. shown provably correct by the techniques in Marzullo's thesis. However,
  1999. while this improves the precision of the time (the intersystem phase
  2000. differences and rate differences will be smaller) the inaccuracy (the
  2001. guarantee given to the user) will be worse! That DTS has chosen not to
  2002. do this is, of course, the basic philosophical difference about what's
  2003. important showing up again. However, the existance of at least one
  2004. method to incorporate clock training into a provable system gives hope
  2005. that both camps can be satified and in particular that the large body of
  2006. work on the NTP local clock model can be incorporated. I am not (yet)
  2007. expert enough in the NTP local clock model to see my way through this.
  2008.  
  2009. The other obvious possibility is to just add the autoconfiguration to
  2010. NTP. To an extent, this is occuring. The multicast functionallity
  2011. clearly addreses the ease-of-management issue. However, for NTP servers,
  2012. I claim that chosing the right server is important enough that it can't
  2013. be left to an algorithm. Swithing at random between servers reintroduces
  2014. the clock-hopping problem (the the extra phase noise produced by the
  2015. clock-hopping will cause problems for NTP.) One could attempt to just
  2016. pick a set of server at random and stick with them for some long time to
  2017. reduce clock hopping, but that will produce serious sub-optimality in
  2018. the case of a changing network configuration (The particular servers
  2019. being synchronized with might become cut-off from their good time
  2020. sources, or the paths to them might involve links which become
  2021. overloaded, and this wouldn't be discovered for a long time.)
  2022.  
  2023. My desire is a solution which maintaines provability and doesn't require
  2024. a large tradeoff between autoconfiguration and accuracy. So far the only
  2025. improvement I can make in the DTS architecture forces me to give up one
  2026. measure of accuracy to improve another. More work needs to be done here.
  2027.  
  2028. ------------------------------------------------------------------------
  2029.  
  2030. Date:     Sat, 24 Mar 90 19:14:56 EST
  2031. From:     Dennis Ferguson <dennis@gw.ccie.utoronto.ca>
  2032. To:  comuzzi@took.dec.com
  2033. Cc:  Mills@udel.edu, elb@mwunix.mitre.org, marcus@osf.org
  2034. Subject: Re? More discussion of the differences (and similarities) of
  2035. DTS and NTP.
  2036. I realize that, while the NTP local clock processing is not a
  2037. particularly difficult coding exercise, it rests on a foundation which
  2038. is the subject of lots of textbooks and quite a number of academic
  2039. journals. I also realize the presentation in Appendix F of the current
  2040. NTP document certainly does not derive this stuff from first principles,
  2041. since that would require turning the NTP spec into another control
  2042. theory textbook. I can understand the derivation in there (though I
  2043. couldn't have produced it, and could verify it only with great
  2044. difficulty) by virtue of a somewhat academic, traditional engineering
  2045. background (Dave seems to have a very academic, traditional engineering
  2046. background), but I realize the stuff may look more than a little opague
  2047. if no one has ever forced you to learn/use that stuff. It is, however,
  2048. very worth while to get a handle on what is in there, at least
  2049. functionally, because this can make orders of magnitude difference in
  2050. the results you get from your time protocol.
  2051.  
  2052. Let me a number of assertions, some of which I'm not going to be able to
  2053. support here, but which can be discovered by looking very carefully at
  2054. the local clock description. I think you will find that it is not what
  2055. you think.
  2056.  
  2057. (1) The NTP local clock does for NTP (and potentially for DTS) what
  2058.     adjtime() does for DTS. It is essentially a procedure which is
  2059.     called with a time offset as an argument, and which does something
  2060.     to the system clock as a result.
  2061.  
  2062. (2) Like adjtime(), the NTP local clock is fully deterministic. There
  2063.     are no probability considerations here. When you give it a time
  2064.     offset, the effect this has on the system clock is fully
  2065.     predictable. Hence the NTP local clock can have no effect on your
  2066.     ability to maintain correctness, any more than the behaviour of
  2067.     adjtime() has any effect on your ability to maintain correctness.
  2068.     The NTP local clock does what it is told, no more and no less.
  2069.  
  2070. (3) I think the specified NTP local clock is (should be, I have to trust
  2071.     Dave's math for this) unconditionally stable for all input. Note
  2072.     that "stable" in this context has a very specific meaning, and may
  2073.     not be what you expect. If the NTP local clock wasn't
  2074.     unconditionally stable for all input with its current parameters, it
  2075.     could be made that way by adjusting those parameters. The stability
  2076.     of the local clock is predictable.
  2077.  
  2078. The local clock, in both NTP and DTS, takes time offsets from UTC as
  2079. input and attempts to adjust the system clock in response to these, in
  2080. principle to make the offsets smaller. Note that this is a feedback
  2081. loop, the the adjustments which are made to the system clock affect the
  2082. next offset which is input to the local clock.
  2083.  
  2084. Now suppose a DTS client has a clock which drifts by 100 ppm. Suppose it
  2085. also manages to obtain offsets every 15 minutes, by exchanges with its
  2086. servers, which represent the difference between the client's system
  2087. clock and UTC accurately to the nanosecond. The client gives an offset
  2088. to the DTS local clock, essentially adjtime(), which slews the clock by
  2089. the amount of the offset, and then sits around waiting for the next
  2090. offset to arrive. Of course, while adjtime() is slewing the clock
  2091. towards 0 offset, the clock's drift is slewing it away at a rate of 90
  2092. ms per 15 minutes.
  2093.  
  2094. At the end of fifteen minutes the whole thing will be repeated. Also, as
  2095. adjtime() will typically slew the clock at a much greater rate than 100
  2096. ppm, the system clock offset from UTC will show a sawtooth waveform
  2097. varying between 0 and 90 ms with a period of 15 minutes, and will
  2098. average 45 ms off. So, for absolutely perfect data in, the DTS local
  2099. clock can get the system clock no closer than 45+-45 ms. This is
  2100. inaccurate (it isn't even meaningful to say that you are getting perfect
  2101. data in, either, since the jitter will be fed back as an uncertainty in
  2102. the input). Indeed, this inaccuracy is not unexpected. This is what is
  2103. called a Type I feedback loop (I think), and is known to be unable to
  2104. track an input without introducing a phase error on the output. Worse,
  2105. for perfect data in consumers of time on that machine will see an
  2106. uncertainty of +-90 ms, even though the true uncertainty is only half
  2107. that (0 to 90 ms), and even though the input data is perfect. This is
  2108. gross.
  2109.  
  2110. The NTP local clock does much, much better, by a couple of techniques.
  2111. First, the jitter the DTS system clock experiences is essentially
  2112. eliminated by not feeding an entire adjustment to the system clock all
  2113. at once, but rather by making very small adjustments at frequent
  2114. intervals (currently 4 seconds in the spec). The NTP local clock hence
  2115. avoids introducing the sawtooth, the clock changes slowly and smoothly.
  2116. Further, the NTP local clock corrects the average error by computing and
  2117. applying a correction for the drift, by implementing a Type II feedback
  2118. loop. Essentially, for perfect data in, the NTP local clock will
  2119. eventually determine the drift of the system clock and, when it does,
  2120. will maintain the average offset of the system clock at 0. I.e.,
  2121. perfectly accurate. A Type II feedback loop will track a fixed input
  2122. accurately. By applying many little corrections to the system clock
  2123. instead of one big one, NTP will also maintain the system clock
  2124. relatively jitter free (one could say absolutely jitter free in
  2125. comparison to DTS).
  2126.  
  2127. Of course, there is no such thing as perfect, but we can begin to assign
  2128. relative orders of magnitude to errors of the DTS and NTP local clock
  2129. schemes (this comparison is deterministic as well, there are no
  2130. probabilities involved). DTS' local clock error is proportional to the
  2131. drift. NTP's local clock error is proportional to the rate of change of
  2132. the drift with respect to time multiplied by the time constant of the
  2133. PLL. In the real world the latter is less than the former by at least
  2134. several orders of magnitude.
  2135.  
  2136. I have grossly oversimplified this, but please believe that the details
  2137. are all in the NTP spec if you decode them. Now, how can replacing DTS'
  2138. use of adjtime() with something which is more accurate affect DTS'
  2139. configurability? How could it possibly affect correctness? I stand by my
  2140. original statement, that the issue of accuracy (with respect to the
  2141. local clock) is completely and utterly orthogonal to any issues of
  2142. configuration or management. DTS just didn't include the machinery to
  2143. condition with the local clock (and apparently is hung up on type I
  2144. feedback loops for clock control when there are other better ways to do
  2145. it), and this is what is so frustrating about it.
  2146.  
  2147. I also think your claim that using local clock processing which does
  2148. frequency compensation would require one to *increase* the inaccuracy
  2149. must either be wrong, or indicate that DTS is doing something very
  2150. silly. Does it make sense that something which can be analytically shown
  2151. to increase accuracy increases the inaccuracy? Does it make sense that,
  2152. if I tune a crystal for zero drift in hardware with a screwdriver that
  2153. the inaccuracy should decrease, while if I tune it for zero drift in
  2154. software the inaccuracy must increase? The mind boggles.
  2155.  
  2156. Further, I think you may still be operating in an unreal world with the
  2157. assertion that a manufacturer could possibly define a maximum drift for
  2158. the clock in a particular model of machines, one that could never be
  2159. exceeded under any circumstances which couldn't be called hardware
  2160. failure. I would suggest to you that the very worst cause of clock drift
  2161. in real systems is not hardware at all, but rather lost clock interrupts
  2162. (which cause large, negative drifts). Would you be willing to certify
  2163. that DEC hardware/operating systems never lose clock interrupts under
  2164. any circumstances? Or provide a guaranteed limit to the number that will
  2165. be lost in any time interval? You can call lost clock interrupts a
  2166. "fault" if you wish, but implying that such "faults" are "historically"
  2167. a rare occurance flies in the face of experience, at least with Unix
  2168. systems.
  2169.  
  2170. Which brings up another assertion I am begining to doubt, that NTP does
  2171. not (or cannot) know the inaccuracy of its time estimate. Joe, take a
  2172. look at how NTP's synchronization distance is accumulated. Don't worry
  2173. about the value of this that the spec suggests be used for stratum 1
  2174. servers, let's assume that this is configured for stratum 1 servers in a
  2175. way which agrees with DTS. Look carefully at how the synchronization
  2176. distance a stratum 3 server will receive. Do you see any reason why I
  2177. could not assert that UTC must be contained in an interval which is +-
  2178. 1/2 the synchronization distance from the system clock's time, and prove
  2179. this assertion by the same principles that DTS uses? Or, if not, that
  2180. there are any uncorrectable imperfections in this assertion?
  2181.  
  2182. I am hence beginning to think as Dave, that NTP's time could be proven
  2183. to lie within known bounds, just as DTS' can. I see nothing that would
  2184. prevent this. If applications needed to know this, I think it could be
  2185. arranged for NTP to provide it.
  2186.  
  2187. The question becomes, then, what is all that statistical junk that NTP
  2188. does? I think the issue that is being missed here (and I'm on thin ice
  2189. again) is that DTS does indeed make some assumptions about probability
  2190. distributions. In particular, all correctness can give you is an
  2191. interval which should include UTC. The system clock, however, cannot be
  2192. set to an interval, it needs a specific value. DTS hence arbitrarily
  2193. assumes that any time in the interval are equally likely to be UTC as
  2194. any other, and hence picks the middle of the interval as this minimizes
  2195. the probable error based on that assumption (the fact that not picking
  2196. the middle of the interval increases the inaccuracy interval
  2197. demonstrates a flaw in the DTS protocol which is also exercised by the
  2198. local clock processing. The protocol demands that the intervals be +-
  2199. something even when it might be known that the true interval is
  2200. +something -something-different. DTS hence claims inaccuracy intervals
  2201. which are often bigger than they should be simply because it lacks the
  2202. ability to represent the true state of affairs. This doesn't affect
  2203. correctness, but reduces the utility of knowing the inaccuracy
  2204. interval).
  2205.  
  2206. NTP, however, assumes that the probability distribution over the
  2207. interval is non-uniform, that some times within the interval are more
  2208. likely to be UTC than others (this isn't strictly true, but I see no
  2209. reason why it couldn't be). It proceeds to determine the time within the
  2210. interval which is most likely to be UTC and sets the clock to that. NTP
  2211. does this in part by casting off samples and servers which it thinks are
  2212. less reliable. If DTS can correctly synchonize to a single server,
  2213. however, then casting off servers you aren't fond of can't affect
  2214. correctness. NTP choses servers it likes (and samples from servers it
  2215. likes) based on presumed characteristics of the probability
  2216. distributions of network traffic. This has no effect on correctness,
  2217. however, and in the extremely unlikely event that the network does not
  2218. behave in the way that NTP expects, NTP's choice of UTC will probably be
  2219. no worse than DTS'. This has no effect on NTP's ability (or lack
  2220. thereof) to produce correct bounds on the estimate, in DTS' sense. Also,
  2221. I find it strange that DTS could claim that avoiding having to "accept
  2222. historical estimates of current network performance" is a feature, when
  2223. this is done by making assumptions about probability distributions which
  2224. have no basis in practical reality at all.
  2225.  
  2226. A couple of things come to mind. Joe, you mentioned something about
  2227. "wild instabilities" which Dave said NTP might suffer in the face of
  2228. poor server selection, or some such. I would suggest to you that the
  2229. term "wild instabilities" is one which is relevant only in relation to
  2230. one's expectation of the performance of your time protocol. To anyone
  2231. who thinks an error of 45+-45 ms in the time the system clock returns
  2232. when given perfect data is acceptable, NTP is as solid as a rock. NTP's
  2233. "wild instabilites" are only relevant if your expectations are much
  2234. higher than DTS', since "wild" for NTP is a lot smaller than the
  2235. instabilities DTS apparently considers normal.
  2236.  
  2237. More than this, I fail to understand the rest of the arguments about why
  2238. NTP couldn't be retrofitted with an autoconfiguration protocol. NTP has
  2239. no configuration rules, it places itself in the heirarchy based on the
  2240. servers available to it. NTP will operate in such a way as to maximize
  2241. the probable accuracy of its time no matter how it is configured. Give
  2242. your NTP daemon a random set of peers and it will chose the best of
  2243. them, adopt a stratum which is appropriate based on the time sources
  2244. available, and make the best use of the time available. Concerns about
  2245. "phase noise" (i.e. jitter) are again based on expectations of the
  2246. performance of the time protocol, an NTP server which takes time from
  2247. your 45+-45 ms host will survive just fine, and indeed will show far
  2248. less jitter than +-45 ms (look at the local clock, high frequency noise
  2249. is damped out). It is just that NTP servers are expected to be a lot
  2250. closer than 45 ms, so your host looks bad compared to NTP's expectations
  2251. (but not needs). Further, the stuff about synchonization loops is
  2252. irrelevant. The NTP protocol survives loops just fine, it's just that
  2253. the consequence of a loop is that the machines involved count their
  2254. statum to infinity and disconnect from the synchronization subnet rather
  2255. than continuing to fool themselves that their servers know something
  2256. they don't. This is quite reasonable behaviour since NTP clocks don't
  2257. drift much when left unsynchronized. I would suggest to you that NTP
  2258. knows far more about Murphy than DTS does at this point, since it has
  2259. been tested in far more environments, on far more machines, in likely
  2260. far harsher environments, through far more revisions, for far longer
  2261. than DTS has. There are three independently done implementations of NTP,
  2262. all of which work well and interoperate. How complex can NTP be? NTP can
  2263. be given a random set of servers and work just fine, thanks. This wasn't
  2264. done with auto-configuration specifically in mind, but rather simply to
  2265. meet robustness requirements. NTP has a lot of real world experience to
  2266. prove that it is robust, and that it is certainly robust in the face of
  2267. even gross misconfiguration. What more is needed for an auto-
  2268. configurable protocol? Autoconfiguration certainly couldn't do a worse
  2269. job than people do.
  2270.  
  2271. As for Byzantine failures, you are right that NTP's scheme for leap
  2272. second notifications suffers from this, but what is the worst thing that
  2273. can happen if this occurs? Right, your clock ends up a second off. With
  2274. DTS, however, it is a virtual certainty that the clock will end up a
  2275. second off when a leap second occurs, so criticizing NTP for leaving
  2276. this hole is a little like the pot calling the kettle black. That DTS
  2277. increases its inaccuracy by a second is irrelevant for comparison, since
  2278. NTP doesn't maintain this inaccuracy. If (when) NTP maintains an
  2279. inaccuracy interval it should probably increase it by a second during
  2280. leaps as well. This doesn't help keep your clock accurate across leaps,
  2281. though.
  2282.  
  2283. For broadcast time, however, I think this is incorrect. The NTP clock
  2284. selection code includes an agreement protocol, and this is still used
  2285. for broadcast time. To cause a failure one would have to co-opt a
  2286. majority of the servers, and this is hardly less robust than DTS. I can
  2287. see little more exposure to such failures with broadcast time than with
  2288. polled time, and I think we must agree that polled NTP is not less
  2289. robust in the face of Byzantine failures than DTS. Further, if you are
  2290. really worried about hostile attacks on your clients then you'll be
  2291. using authentication anyway, in which case there is no additional
  2292. exposure to such failures.
  2293.  
  2294. More than this, note that NTP's multicast time is used in the LAN
  2295. environment. The transit delays here are a few milliseconds, and indeed
  2296. my daemon includes partially implemented code to determine these delays
  2297. on the fly by polling. This transit delay isn't even measureable by a
  2298. lot of machines (between machines with 10 or 20 ms clocks you end up
  2299. computing absurdities like negative round trip delays. Does DTS handle
  2300. this?), so DTS isn't necessarily going to know a whole lot about this
  2301. delay by polling anyway. Now, you are willing to accept a 45+-45 ms
  2302. error in the setting of your clock and a 90 ms inaccuracy, for perfect
  2303. data in, due to the primitive local clock processing that DTS does, why
  2304. the heck not add in another, say, 50 ms or something equally outrageous,
  2305. to the inaccuracy interval for the broadcast and forget about it? The
  2306. chance of it ever exceeding 50 ms (or whatever) is of about the same
  2307. order as, say, lost clock interrupts or a hardware failure ruining your
  2308. assumptions about the maximum local oscillator drift. Call the big delay
  2309. a network "fault" and forget about it.
  2310.  
  2311. The real advantage of multicast time is that you can update a large
  2312. number of clients very frequently with next to no traffic. One minute
  2313. updates can allow much greater precision under adverse conditions than,
  2314. say, 15 minute updates in any case, yet the cost of serving 300 hundred
  2315. clients this way drops from hundreds of packets per minute to one packet
  2316. per minute. You may not care about this, since DTS often seems to me to
  2317. be little concerned with accuracy in any case, but some people like it.
  2318. And note that you've already allowed probabilities to creep into your
  2319. inaccuracy interval by assuming one can configure a maximum drift for
  2320. any system (of course, you punt on this by calling violations of the
  2321. assumption "faults"), it seems to me that assumptions concerning one way
  2322. delays across LANs do not increase the probability of the inaccuracy
  2323. being wrong (and, of course, you can always call such cases "faults").
  2324.  
  2325. One comment about NCS and Kerberos for authentication. Authentication is
  2326. notorious for increasing code path lengths (possibly asymmetrically) and
  2327. this affects accuracy adversely. This is in part why NTP includes an
  2328. integral authentication protocol, because it is concerned with accuracy
  2329. and integrating the authentication allows it to optimally control the
  2330. damage this does. Because NTP is concerned with accuracy (it is apparent
  2331. that DTS is far less so) I can't ever see the internal cryto-checksum
  2332. code being moved to an external agent (I would object if it was), since
  2333. you can always do a better job, in the real time sense, with this
  2334. incorporated as part of the protocol and coded by someone who is aware
  2335. of the issues. NTP could use help with key management, though.
  2336. Actually, upon rereading this note I find (in addition to it being far
  2337. longer than it should be) that I've taken on to much of a pro-NTP
  2338. debating tone. I apologize in advance. I guess the part that galled me
  2339. is the "not willing to accept historical estimates of current network
  2340. performance" comment as an excuse to ignore NTP's well developed, well
  2341. tested time keeping technology when designing the DTS protocol, when
  2342. what has really been done is to replace NTP's observation-based
  2343. assumptions about the probability distributions of network gunk with
  2344. assumptions concerning probabilities which have no basis in the real
  2345. world and which are made strictly to avoid exposing a defect in DTS'
  2346. representation of the inaccuracy. Dave's simulation results indicate
  2347. that it is indeed the case that you've made DTS work worse in the real
  2348. world than NTP (at keeping the clock correct, which is what I desire
  2349. most from my time keeping protocol, not at computing correct error
  2350. bounds, which I desire less anyway). NTP, with its current-reality based
  2351. assumptions on network characteristics, couldn't do worse than DTS,
  2352. whose assumptions seem based on nothing. Couple this with the stability
  2353. and accuracy that NTP's local clock gives it (and the local clock is
  2354. deterministic, the "historical estimates" fuzz can't even be used to
  2355. justify ignoring this) and you've got a powerful, proven time keeping
  2356. protocol. And DTS ignored all of it. Missing the local clock in
  2357. particular is unforgiveable.
  2358.  
  2359. NTP doesn't produce a "correct" inaccuracy, but there doesn't seem to me
  2360. to be any reason which prevents it from doing so. The statistical
  2361. assumptions it makes have no effect on this. If there are consumers who
  2362. would like to know the inaccuracy (I would) I think NTP could provide
  2363. it, perhaps without even changing packet format. And NTP doesn't have an
  2364. autoconfiguration protocol, but it has wide experience with people-
  2365. configuration and you couldn't possible design an auto-configuration
  2366. protocol which does worse than people.
  2367.  
  2368. I am sorry for the tone of this, but I can't help but take issue to the
  2369. (apparent in DTS' design) attitude that nothing in NTP was worth looking
  2370. at (from my perspective DTS' treatment of the local clock is
  2371. horrendously primitive and simple minded, for example). I understand
  2372. from your last note, however, that you are maybe growing more sensitive
  2373. to this. If we are to standardize a time protocol, let us make it a good
  2374. one by not ignoring existing experience.
  2375.  
  2376. ------------------------------------------------------------------------
  2377.  
  2378. 24-MAR-1990 19:15:29.73
  2379. From: Michael Soha LKG1-2/A19 226-7658 <soha@nerva.enet.dec.com>
  2380. To:  comuzzi@took.dec.com
  2381. CC:  Mills@udel.edu, elb@mwunix.mitre.org, marcus@osf.org
  2382. Subj:     Re: More discussion of the differences (and similarities) of
  2383. DTS and NTP.
  2384.  
  2385.      I realize that, while the NTP local clock processing is not a
  2386.      particularly difficult coding exercise, it rests on a foundation
  2387.      which is the subject of lots of textbooks and quite a number of
  2388.      academic journals. I also realize the presentation in Appendix F of
  2389.      the current NTP document certainly does not derive this stuff from
  2390.      first principles, since that would require turning the NTP spec
  2391.      into another control theory textbook. I can understand the
  2392.      derivation in there (though I couldn't have produced it, and could
  2393.      verify it only with great difficulty) by virtue of a somewhat
  2394.      academic, traditional engineering background (Dave seems to have a
  2395.      very academic, traditional engineering background), but I realize
  2396.      the stuff may look more than a little opague if no one has ever
  2397.      forced you to learn/use that stuff. It is, however, very worth
  2398.      while to get a handle on what is in there, at least functionally,
  2399.      because this can make orders of magnitude difference in the results
  2400.      you get from your time protocol.
  2401.  
  2402. If the author is referring to Control Theory I agree that it is the
  2403. subject of many textbooks and journal articles. However, if he's
  2404. alluding to the modeling of quartz oscillators and their stability I
  2405. have to disagree. My references, [2-6], do not use the model employed by
  2406. NTP. Refer to my initial discussion on training. Aside, my NTP
  2407. documentation, RFC 1119, does not have an Appendix F. I assume the
  2408. author is referring to Section 5, 'Local Clocks' [Ref 1].
  2409.  
  2410. Speaking for myself, I took several courses in Control Theory, not so
  2411. much because I was "forced", but simply because I enjoyed the subject.
  2412.  
  2413. Let me a number of assertions, some of which I'm not going to be able to
  2414. support here, but which can be discovered by looking very carefully at
  2415. the local clock description. I think you will find that it is not what
  2416. you think.
  2417.  
  2418.      (1) The NTP local clock does for NTP (and potentially for DTS) what
  2419.          adjtime() does for DTS. It is essentially a procedure which is
  2420.          called with a time offset as an argument, and which does
  2421.          something to the system clock as a result.
  2422.  
  2423. I agree. Both NTP and DTSS are time synchronization protocols.
  2424.  
  2425.      (2) Like adjtime(), the NTP local clock is fully deterministic.
  2426.          There are no probability considerations here. When you give it
  2427.          a time offset, the effect this has on the system clock is fully
  2428.          predictable. Hence the NTP local clock can have no effect on
  2429.          your ability to maintain correctness, any more than the
  2430.          behaviour of adjtime() has any effect on your ability to
  2431.          maintain correctness. The NTP local clock does what it is told,
  2432.          no more and no less.
  2433.  
  2434. Deterministic systems can be wrong. I don't think Joe was trying trying
  2435. to say that NTP is indeterministic (God doesn't play dice with NTP). I
  2436. think what he reacting to was the lack of a correctness proof and a
  2437. definition for correctness. As discussed previously, I believe the NTP
  2438. clock model is unsound.
  2439.  
  2440.      (3) I think the specified NTP local clock is (should be, I have to
  2441.          trust Dave's math for this) unconditionally stable for all
  2442.          input. Note that "stable" in this context has a very specific
  2443.          meaning, and may not be what you expect. If the NTP local clock
  2444.          wasn't unconditionally stable for all input with its current
  2445.          parameters, it could be made that way by adjusting those
  2446.          parameters. The stability of the local clock is predictable.
  2447.  
  2448. Reading this paragraph I see the author saying NTP should be stable and
  2449. if it isn't we can fix it. Referring to 'Modern Control Engineering' by
  2450. Ogata [Ref 10], pg 7 "From the point of view of stability, the open loop
  2451. control system is easier to build since stability is not a major
  2452. problem. On the other hand, stability is always a major problem in the
  2453. closed loop system since it may tend to overcorrect errors which cause
  2454. oscillations of constant or changing amplitude". My interpretation of
  2455. stability is just that, no oscillations. See Ogata, pg 217 'Absolute
  2456. stability, relative stability, and steady state error' for additional
  2457. discussion. Furthermore, while we are on the topic of stability, one has
  2458. to acknowledge that a type II system is more apt to be unstable than a
  2459. type I system. Again from Ogata, pg 284, "As the type number is
  2460. increased, accuracy is improved; however, increasing the type number
  2461. aggravates the stability problem. A compromise between steady state
  2462. accuracy and relative stability is always necessary". There are no easy
  2463. answers in this world. Is the NTP clock model the proper choice in terms
  2464. of accuracy and relative stability?
  2465.  
  2466. In summary, I agree with only one of Dennis' assertions, NTP and DTSS
  2467. are designed to synchronize clocks in a computer network.
  2468.  
  2469. The local clock, in both NTP and DTS, takes time offsets from UTC as
  2470. input and attempts to adjust the system clock in response to these, in
  2471. principle to make the offsets smaller. Note that this is a feedback
  2472. loop, the the adjustments which are made to the system clock affect the
  2473. next offset which is input to the local clock.
  2474.  
  2475.      Now suppose a DTS client has a clock which drifts by 100 ppm.
  2476.      Suppose it also manages to obtain offsets every 15 minutes, by
  2477.      exchanges with its servers, which represent the difference between
  2478.      the client's system clock and UTC accurately to the nanosecond. The
  2479.      client gives an offset to the DTS local clock, essentially
  2480.      adjtime(), which slews the clock by the amount of the offset, and
  2481.      then sits around waiting for the next offset to arrive. Of course,
  2482.      while adjtime() is slewing the clock towards 0 offset, the clock's
  2483.      drift is slewing it away at a rate of 90 ms per 15 minutes. At the
  2484.      end of fifteen minutes the whole thing will be repeated. Also, as
  2485.      adjtime() will typically slew the clock at a much greater rate than
  2486.      100 ppm, the system clock offset from UTC will show a sawtooth
  2487.      waveform varying between 0 and 90 ms with a period of 15 minutes,
  2488.      and will average 45 ms off. So, for absolutely perfect data in, the
  2489.      DTS local clock can get the system clock no closer than 45+-45 ms.
  2490.      This is inaccurate (it isn't even meaningful to say that you are
  2491.      getting perfect data in, either, since the jitter will be fed back
  2492.      as an uncertainty in the input). Indeed, this inaccuracy is not
  2493.      unexpected. This is what is called a Type I feedback loop (I
  2494.      think), and is known to be unable to track an input without
  2495.      introducing a phase error on the output. Worse, for perfect data in
  2496.      consumers of time on that machine will see an uncertainty of +-90
  2497.      ms, even though the true uncertainty is only half that (0 to 90
  2498.      ms), and even though the input data is perfect. This is gross.
  2499.  
  2500. I agree that if one has a very poor oscillator, it will drift on the
  2501. order of 90 msec/15 minutes. However, before I apply the NTP clock model
  2502. and expect to drive the stability to one part in 10**8, I'd first
  2503. consider what is actually possible (ie, technically sound). Another
  2504. aside, the statement "..UTC accurately to the nanosecond" is meaningless
  2505. for several reasons. First, the current state of art for time transfer
  2506. (using the Global Positioning System, GPS) can achieve a precision of a
  2507. few nanoseconds Ref [5,8]. This precision is achieved through the use of
  2508. cesium clocks, very precise position information, and long integration
  2509. times. It is unreasonably, to say the least, that one could expect to
  2510. achieve this precision in a computer network. Secondly, the use of UTC
  2511. (as defined by the CCIR, Ref 9) states that '... UTC enables events to
  2512. be determined with an uncertainty of 1 us;'. If you are looking at time
  2513. transfer with a precision on the order of nanoseconds, one must specify
  2514. Timing Center eg, UTC(NIST) (see Ref 11 for a description). The term
  2515. Type I feedback is a reference to the steady state error characteristics
  2516. for a control system. Saying that a Type I is unable to track an input
  2517. without without error is wrong (see Ref 10 ppg 283-292) A Type I system
  2518. can track a step input with ZERO steady-state error. For ramp input it
  2519. will a finite error, which can be reduced by tailoring the 7** system. A
  2520. Type II system can track a ramp input with zero steady 7** state error.
  2521. As discussed earlier in response '5**' a proper solution is 7** always a
  2522. compromise between several parameters (eg, stability, steady 7** state
  2523. error, transient errors, over-shoot, time to first zero, etc...) 7** In
  2524. other words, a type II system isn't always better than a type I.
  2525.  
  2526.      The NTP local clock does much, much better, by a couple of
  2527.      techniques. First, the jitter the DTS system clock experiences is
  2528.      essentially eliminated by not feeding an entire adjustment to the
  2529.      system clock all at once, but rather by making very small
  2530.      adjustments at frequent intervals (currently 4 seconds in the
  2531.      spec). The NTP local clock hence avoids introducing the sawtooth,
  2532.      the clock changes slowly and smoothly. Further, the NTP local clock
  2533.      corrects the average error by computing and applying a correction
  2534.      for the drift, by implementing a Type II feedback loop.
  2535.      Essentially, for perfect data in, the NTP local clock will
  2536.      eventually determine the drift of the system clock and, when it
  2537.      does, will maintain the average offset of the system clock at 0.
  2538.      I.e., perfectly accurate. A Type II feedback loop will track a
  2539.      fixed input accurately. By applying many little corrections to the
  2540.      system clock instead of one big one, NTP will also maintain the
  2541.      system clock relatively jitter free (one could say absolutely
  2542.      jitter free in comparison to DTS).
  2543.  
  2544. For perfect data in, the NTP local clock MODEL may be able to reduce the
  2545. offest to zero. However, as for the actual quartz oscillator, it
  2546. impossible. There will always be short-term drift, as discussed in the
  2547. beginning of this memo. As for, Type II vs Type I, it is naive to say
  2548. that a Type II system is always better than a Type I. What is better?
  2549. less stable? more accurate? more transient errors?
  2550.  
  2551.      Of course, there is no such thing as perfect, but we can begin to
  2552.      assign relative orders of magnitude to errors of the DTS and NTP
  2553.      local clock schemes (this comparison is deterministic as well,
  2554.      there are no probabilities involved). DTS' local clock error is
  2555.      proportional to the drift. NTP's local clock error is proportional
  2556.      to the rate of change of the drift with respect to time multiplied
  2557.      by the time constant of the PLL. In the real world the latter is
  2558.      less than the former by at least several orders of magnitude.
  2559.  
  2560. It is wrong to say that: DTS' local clock error is proportional to to
  2561. drift. The inaccuracy will grow at a rate equal to the maximum drift.
  2562. The test data to date indicates that most VAX oscillator are much better
  2563. than 1 part in 10**4. So the difference between two DTS local clocks
  2564. will be much better than the max drift. So why use 1 part in 10**4, that
  2565. number accounts for all expected drift components: initial offset; aging
  2566. for the lifetime of the product, 10 years; and environment (temperature,
  2567. humidity, voltage supply, etc).
  2568.  
  2569. I have a real problem with the quote 'several orders of magnitude'. I
  2570. have seen in several discussions on NTP that it can achieve stabilities
  2571. on the order of 1 part in 10**8. All of the data that I have seen on
  2572. quartz oscillators [Ref 2-7] indicate that is impossible for
  2573. uncompensated oscillators to reach a stability of one part in 10**8.
  2574.  
  2575.      I have grossly oversimplified this, but please believe that the
  2576.      details are all in the NTP spec if you decode them. Now, how can
  2577.      replacing DTS' use of adjtime() with something which is more
  2578.      accurate affect DTS' configurability? How could it possibly affect
  2579.      correctness? I stand by my original statement, that the issue of
  2580.      accuracy (with respect to the local clock) is completely and
  2581.      utterly orthogonal to any issues of configuration or management.
  2582.      DTS just didn't include the machinery to condition with the local
  2583.      clock (and apparently is hung up on type I feedback loops for clock
  2584.      control when there are other better ways to do it), and this is
  2585.      what is so frustrating about it.
  2586.  
  2587. If one adds complexity to increase the accuracy of a system, than it may
  2588. result in additional management and/or configurability. In fact I'd
  2589. argue that this is true more often than not. Saying the two are
  2590. completely and utterly orthogonal is overstating your case.
  2591.  
  2592. Personally I like control theory, mainly because it is a challenge to do
  2593. the right thing. The question of Type I vs Type II is (for me at least)
  2594. unrelated to why I don't like the NTP clock model. I simply believe that
  2595. it is technically unsound to 'train' an uncompensated 12** oscillator
  2596. [Ref 2-6].
  2597.  
  2598.      I also think your claim that using local clock processing which
  2599.      does frequency compensation would require one to *increase* the
  2600.      inaccuracy must either be wrong, or indicate that DTS is doing
  2601.      something very silly. Does it make sense that something which can
  2602.      be analytically shown to increase accuracy increases the
  2603.      inaccuracy? Does it make sense that, if I tune a crystal for zero
  2604.      drift in hardware with a screwdriver that the inaccuracy should
  2605.      decrease, while if I tune it for zero drift in software the
  2606.      inaccuracy must increase? The mind boggles.
  2607.  
  2608. The reason you may want to consider increase the inaccuracy is for
  2609. robustness. That is, if the correction is correct 99% of the time, then
  2610. for the 1% of the time that the correction is incorrect, you will still
  2611. contain UTC in the time interval.
  2612.  
  2613.      Further, I think you may still be operating in an unreal world with
  2614.      the assertion that a manufacturer could possibly define a maximum
  2615.      drift for the clock in a particular model of machines, one that
  2616.      could never be exceeded under any circumstances which couldn't be
  2617.      called hardware failure. I would suggest to you that the very worst
  2618.      cause of clock drift in real systems is not hardware at all, but
  2619.      rather lost clock interrupts (which cause large, negative drifts).
  2620.      Would you be willing to certify that DEC hardware/operating systems
  2621.      never lose clock interrupts under any circumstances? Or provide a
  2622.      guaranteed limit to the number that will be lost in any time
  2623.      interval? You can call lost clock interrupts a "fault" if you wish,
  2624.      but implying that such "faults" are "historically" a rare
  2625.      occurrence flies in the face of experience, at least with Unix
  2626.      systems.
  2627.  
  2628. Stating a maximum number for drift can be done if one accounts for all
  2629. of the contributors to drift (short and long term). One only needs to
  2630. examine the oscillator specification. The main contributors are: aging,
  2631. initial accuracy and temperature stability. Accounting for these
  2632. contributors one can easily show that a stability of 1 part in 10**4 is
  2633. a proper choice (assuming a lifetime 10 years). I agree that accounting
  2634. for missing clock interrupts is a very difficult problem. Does NTP have
  2635. a solution for this?
  2636.  
  2637.      Which brings up another assertion I am beginning to doubt, that NTP
  2638.      does not (or cannot) know the inaccuracy of its time estimate. Joe,
  2639.      take a look at how NTP's synchronization distance is accumulated.
  2640.      Don't worry about the value of this that the spec suggests be used
  2641.      for stratum 1 servers, let's assume that this is configured for
  2642.      stratum 1 servers in a way which agrees with DTS. Look carefully at
  2643.      how the synchronization distance a stratum 3 server will receive.
  2644.      Do you see any reason why I could not assert that UTC must be
  2645.      contained in an interval which is +-1/2 the synchronization
  2646.      distance from the system clock's time, and prove this assertion by
  2647.      the same principles that DTS uses? Or, if not, that there are any
  2648.      uncorrectable imperfections in this assertion?
  2649.  
  2650. I agree that NTP may be able to provide an inaccuracy. But you may need
  2651. additional data to account for processing delays and the local clock
  2652. resolution for each NTP node from the stratum 1 server.
  2653.  
  2654.      The question becomes, then, what is all that statistical junk that
  2655.      NTP does? I think the issue that is being missed here (and I'm on
  2656.      thin ice again) is that DTS does indeed make some assumptions about
  2657.      probability distributions. In particular, all correctness can give
  2658.      you is an interval which should include UTC. The system clock,
  2659.      however, cannot be set to an interval, it needs a specific value.
  2660.      DTS hence arbitrarily assumes that any time in the interval are
  2661.      equally likely to be UTC as any other, and hence picks the middle
  2662.      of the interval as this minimizes the probable error based on that
  2663.      assumption (the fact that not picking the middle of the interval
  2664.      increases the inaccuracy interval demonstrates a flaw in the DTS
  2665.      protocol which is also exercised by the local clock processing. The
  2666.      protocol demands that the intervals be +-something even when it
  2667.      might be known that the true interval is +something -something-
  2668.      different. DTS hence claims inaccuracy intervals which are often
  2669.      bigger than the? should be simply because it lacks the ability to
  2670.      represent the true state of affairs. This doesn't affect
  2671.      correctness, but reduces the utility of knowing the inaccuracy
  2672.      interval).
  2673.  
  2674. See my response [above] and my initial discussion on training. DTS is
  2675. not optimal since it balances the inaccuracy about the midpoint. One
  2676. need not use a balance interval by providing three datapoints: time,
  2677. +inacc, and -inacc; however we decided that this optimization was beyond
  2678. the point of diminishing returns.
  2679.  
  2680.      NTP, however, assumes that the probability distribution over the
  2681.      interval is non-uniform, that some times within the interval are
  2682.      more likely to be UTC than others (this isn't strictly true, but I
  2683.      see no reason why it couldn't be). It proceeds to determine the
  2684.      time within the interval which is most likely to be UTC and sets
  2685.      the clock to that. NTP does this in part by casting off samples and
  2686.      servers which it thinks are less reliable. If DTS can correctly
  2687.      synchronize to a single server, however, then casting off servers
  2688.      you aren't fond of can't affect correctness. NTP choses servers it
  2689.      likes (and samples from servers it likes) based on presumed
  2690.      characteristics of the probability distributions of network
  2691.      traffic. This has no effect on correctness, however, and in the
  2692.      extremely unlikely event that the network does not behave in the
  2693.      way that NTP expects, NTP's choice of UTC will probably be no worse
  2694.      than DTS'. This has no effect on NTP's ability (or lack thereof) to
  2695.      produce correct bounds on the estimate, in DTS' sense. Also, I find
  2696.      it strange that DTS could claim that avoiding having to "accept
  2697.      historical estimates of current network performance" is a feature,
  2698.      when this is done by making assumptions bout probability
  2699.      distributions which have no basis in practical reality at all.
  2700.  
  2701. 'most likely to be UTC' describes why NTP is different form DTSS. NTP
  2702. focuses on accuracy while DTSS main goal is to always include UTC in the
  2703. computed time interval. Neither one is necessarily better than the
  2704. other.
  2705.  
  2706. As described in Dennis' memo and my responses, NTP uses a different
  2707. control mechanism than DTS (eg type II vs Type I). Given this, it is
  2708. difficult to accept the claim that NTP choice will be no worse than
  2709. DTSS'.
  2710.  
  2711. Two points. 1. Historical estimates of network performance may be stale
  2712. due to changes in the network layer (different routes) and the datalink
  2713. layer (changes in the bridge topology). How does one ensure that the
  2714. network performance estimates reflect the current state of the affairs.
  2715. 2. The statement the 'DTS's assumption have no basis in reality' is
  2716. false. See response **14 and my initial discussion on reality.
  2717.  
  2718.      A couple of things come to mind. Joe, you mentioned something about
  2719.      "wild instabilities" which Dave said NTP might suffer in the face
  2720.      of poor server selection, or some such. I would suggest to you that
  2721.      the term "wild instabilities" is one which is relevant only in
  2722.      relation to one's expectation of the performance of your time
  2723.      protocol. To anyone who thinks an error of 45+-45 ms in the time
  2724.      the system clock returns when given perfect data is acceptable, NTP
  2725.      is as solid as a rock. NTP's "wild instabilites" are only relevant
  2726.      if your expectations are much higher than DTS', since "wild" for
  2727.      NTP is a lot smaller than the instabilities DTS apparently
  2728.      considers normal.
  2729.  
  2730. I thought this comment originally came from Dave (wrt DTSS giving time
  2731. to NTP). It may have been overstated, however the point remains that it
  2732. is more difficult to ensure stability in a Type II system (as compared
  2733. to a type I).
  2734.  
  2735. More than this, I fail to understand the rest of the arguments about why
  2736. NTP couldn't be retrofitted with an autoconfiguration protocol. NTP has
  2737. no configuration rules, it places itself in the heirarchy based on the
  2738. servers available to it. NTP will operate in such a way as to maximize
  2739. the probable accuracy of its time no matter how it is configured. Give
  2740. your NTP daemon a random set of peers and it will chose the best of
  2741. them, adopt a stratum which is appropriate based on the time sources
  2742. available, and make the best use of the time available. Concerns about
  2743. "phase noise" (i.e. jitter) are again based on expectations of the
  2744. performance of the time protocol, an NTP server which takes time from
  2745. your 45+-45 ms host will survive just fine, and indeed will show far
  2746. less jitter than +-45 ms (look at the local clock, high frequency noise
  2747. is damped out). It is just that NTP servers are expected to be a lot
  2748. closer than 45 ms, so your host looks bad compared to NTP's expectations
  2749. (but not needs). Further, the stuff about synchonization loops is
  2750. irrelevant. The NTP protocol survives loops just fine, it's just that
  2751. the consequence of a loop is that the machines involved count their
  2752. statum to infinity and disconnect from the synchronization subnet rather
  2753. than continuing to fool themselves that their servers know something
  2754. they don't. This is quite reasonable behaviour since NTP clocks don't
  2755. drift much when left unsynchronized. I would suggest to you that NTP
  2756. knows far more about Murphy than DTS does at this point, since it has
  2757. been tested in far more environments, on far more machines, in likely
  2758. far harsher environments, through far more revisions, for far longer
  2759. than DTS has. There are three independently done implementations of NTP,
  2760. all of which work well and interoperate. How complex can NTP be? NTP can
  2761. be given a random set of servers and work just fine, thanks. This wasn't
  2762. done with auto-configuration specifically in mind, but rather simply to
  2763. meet robustness requirements. NTP has a lot of real world experience to
  2764. prove that it is robust, and that it is certainly robust in the face of
  2765. even gross misconfiguration. What more is needed for an auto-
  2766. configurable protocol? Autoconfiguration certainly couldn't do a worse
  2767. job than people do.
  2768.  
  2769.      As for Byzantine failures, you are right that NTP's scheme for leap
  2770.      second notifications suffers from this, but what is the worst thing
  2771.      that can happen if this occurs? Right, your clock ends up a second
  2772.      off. With DTS, however, it is a virtual certainty that the clock
  2773.      wil end up a second off when a leap second occurs, so criticizing
  2774.      NTP for leaving this hole is a little like the pot calling the
  2775.      kettle black. That DTS increases its inaccuracy by a second is
  2776.      irrelevant for comparison, since NTP doesn't maintain this
  2777.      inaccuracy. If (when) NTP maintains an inaccuracy interval it
  2778.      should probably increase it by a second during leaps as well. This
  2779.      doesn't help keep your clock accurate across leaps, though.
  2780.  
  2781. The statement that 'NTP should increase it's inaccuracy' implies that
  2782. DTSS is doing the right thing. Am I confused?
  2783.  
  2784.      For broadcast time, however, I think this is incorrect. The NTP
  2785.      clock selection code includes an agreement protocol, and this is
  2786.      still used for broadcast time. To cause a failure one would have to
  2787.      co-opt a majority of the servers, and this is hardly less robust
  2788.      than DTS. I can see little more exposure to such failures with
  2789.      broadcast time than with polled time, and I think we must agree
  2790.      that polled NTP is not less robust in the face of Byzantine
  2791.      failures than DTS. Further, if you are really worried about hostile
  2792.      attacks on your clients then you'll be using authentication anyway,
  2793.      in which case there is no additional exposure to such failures.
  2794.      More than this, note that NTP's multicast time is used in the LAN
  2795.      environment. The transit delays here are a few milliseconds, and
  2796.      indeed my daemon includes partially implemented code to determine
  2797.      these delays on the fly by polling. This transit delay isn't even
  2798.      measureable by a lot of machines (between machines with 10 or 20 ms
  2799.      clocks you end up computing absurdities like negative round trip
  2800.      delays. Does DTS handle this?), so DTS isn't necessarily going to
  2801.      know a whole lot about this delay by polling anyway. Now, you are
  2802.      willing to accept a 45+-45 ms error in the setting of your clock
  2803.      and a 90 ms inaccuracy, for perfect data in, due to the primitive
  2804.      local clock processing that DTS does, why the heck not add in
  2805.      another, say, 50 ms or something equally outrageous, to the
  2806.      inaccuracy interval for the broadcast and forget about it? The
  2807.      chance of it ever exceeding 50 ms (or whatever) is of about the
  2808.      same order as, say, lost clock interrupts or a hardware failure
  2809.      ruining your assumptions about the maximum local oscillator drift.
  2810.      Call the big delay a network "fault" and forget about it.
  2811.  
  2812. How do you account for changes in the bridged LAN and/or remote bridges.
  2813. Most LANs or bridged, a change in topology will affect the network
  2814. delay. Furthermore, if one has a remote bridge, say at 56 kbps, then for
  2815. each minimum size packet (64 bytes) another 5 msec of ONEWAY delay (ie,
  2816. asymmetrical) will be introduced. We have measured ONEWAY delays on LANs
  2817. (with only local bridges) as high as 100 msec.
  2818.  
  2819. As discussed in previous comments I do not agree that NTP will work the
  2820. same as DTSS. As for the local clock, I do not believe that it is
  2821. technically sound to 'train' an uncompensated clock (see discussion on
  2822. training at beginning of this memo.)
  2823.  
  2824.      I am sorry for the tone of this, but I can't help but take issue to
  2825.      the (apparent in DTS' design) attitude that nothing in NTP was
  2826.      worth looking at (from my perspective DTS' treatment of the local
  2827.      clock is horrendously primitive and simple minded, for example). I
  2828.      understand from your last note, however, that you are maybe growing
  2829.      more sensitive to this. If we are to standardize a time protocol,
  2830.      let us make it a good one by not ignoring existing experience.
  2831.  
  2832. To be frank, I would say that NTP's view that an uncompensated can be
  2833. 'trained' to one part in 10**8 has no foundation in the scientific
  2834. literature.
  2835.  
  2836.      REFERENCES
  2837.  
  2838. 1.   Mills, D. L., "Network Time Protocol (Version 2) Specification and
  2839.      Implementation", RFC: 119, University of Delaware, September 1989
  2840.  
  2841. 2.   Vig, J. R., "Quartz Crystal Resonators & Oscillators For Frequency
  2842.      Control and Timing Applications", SLCET-TR-88-1,US Army Electronics
  2843.      Technology and Devices Laboratory, Fort Momouth, New Jersey,
  2844.      January 1988.
  2845.  
  2846. 3.   Bottom, V. E., "Introduction to quartz Crystal Unit Design", Van
  2847.      Nostrand Reinhold Electrical/Computer Science and Engineering
  2848.      Series, New York, 1982
  2849.  
  2850. 4.   Frerking. M. E., "Crystal Oscillator Design and Temperature
  2851.      Compensation",  Van Nostrand Reinhold Company/Litton Educational
  2852.      Publishing, 1978
  2853.  
  2854. 5.   NIST, "Time and Frequency Seminar - June 14, 15, 16 1988"  Time and
  2855.      Frequency Division, NIST, Boulder Colorado
  2856.  
  2857. 6.   NIST, "Time and Frequency: Theory and Fundamentals", NBS Monograph
  2858.      140,  SD Catalog No.  C13.44:140., Boulder, Colorado.
  2859.  
  2860. 7.   VECTRON, "Crystal Oscillators 1989", VECTRON Laboratories, Inc,
  2861.      Norwalk Connecticut.
  2862.  
  2863. 8.   Imae, M. et al, "A dual frequency GPS receiver measuring ionspheric
  2864.      effects without code demodulation and its application to time
  2865.      comparisons", Proceedings of the 20th Annual Precise Time and Time
  2866.      Interval (PTTI) Applications and planning Meeting, Vienna, Virgina,
  2867.      1988.
  2868.  
  2869. 9.   CCIR, "Recommendations and Reports of the CCIR, 1986 - Standard
  2870.      Frequencies and Time Signals", XVIth Plenary, Dubrovnik, 1986.
  2871.  
  2872. 10.  Ogata, K., "Modern Control Enginnering", Prentice Hall Inc,
  2873.      Englewood Cliffs, New Jersey, 1970.
  2874. 11.  NIST, "Time & Frequency Bulletin No. 388 March 1900", NISTR 90-
  2875.      3940-3 (a monthly report from NIST), Time and Frequency Division,
  2876.      NIST, Boulder, Colorado.
  2877.  
  2878. ------------------------------------------------------------------------
  2879.  
  2880. Date  Tue, 27 Mar 90 4:59:06 GMT
  2881. From  Mills@udel.edu
  2882. To    comuzzi@took.enet.dec.com
  2883. cc    mills@udel.edu, dennis@gw.ccie.utoronto.ca
  2884. Subject? Re? I've sent this to everyone else, yours bounced because of a
  2885. typo.
  2886.  
  2887.      ... This is a note to continue the DTS/NTP comparison, because I
  2888.      too am finding this conversation fruitful. Dennis, I would be glad
  2889.      to mail you a copy of the DTS architecture if you want one. (and
  2890.      Dave, I've even changed the cover and introduction). ...
  2891.  
  2892. Yeah, I've learned something, too. Are you game to cast the document as
  2893. an RFC? It's too bad we didn't schmooze while the stove was still
  2894. simmering the kettle. Is the kettle still warm?
  2895.  
  2896.      ... Allow me to start with the decision of DTS not to support a
  2897.      multicast mode. One reason was that protocols which multicast the
  2898.      time will be subject to Byzantine failures. ...
  2899.  
  2900. There are two issues here, one pragmatic and the other hidden. Since NTP
  2901. multicast clients may enjoy multiple NTP multicast servers on the same
  2902. wire, Byzantine vulnerabilities are reduced. The only thing you lose is
  2903. the synchronization delay (aka inaccuracy interval - darn, we should
  2904. have both called that the "confidence interval"), which in Unix
  2905. community is imperceptable. The hidden agenda is to explore the utility
  2906. of the new IP multicast capability, which is quickly becoming ubiquitous
  2907. in the Internet R&D community. While I would like to make the case that
  2908. multicasting should be supported on its own merits, I have great
  2909. nervousness about such scenarios as CMU, which as you probably know,
  2910. runs what could be called a godzilla network of intertwined wires and
  2911. bridges. I am told that each of several NTP servers now hark upwards of
  2912. 500 clients each. If each one of those clients dudes expects to rattle
  2913. chimes of, say, three servers each, the induced RF field might misdirect
  2914. planes 50 miles away.
  2915.  
  2916.      ... The second point, the one I was trying to raise in my reply to
  2917.      Dave, was that it was DTS's intention to have the time and interval
  2918.      information available on every node.
  2919.  
  2920. The inaccuracy interval is available in NTP, too, but a Unix interface
  2921. is not. While not specified in the NTP spec, a clamp should be placed on
  2922. the frequency compensation term, like +-20 ppm or something like that.
  2923. It would then be possible to make almost the same confidence statements
  2924. about NTP as for DTS. The "almost" is because of the basic difference
  2925. between the NTP selection/combining algorithm and the DTS intersection
  2926. algorithm. These issues need to be discussed at another time.
  2927.  
  2928.      ... The third point I'd like to discuss refers to Dave's statement
  2929.      about a "considerable Internet constituency which has noisily
  2930.      articulated the need for a multicast function when the number of
  2931.      clients on the wire climbs to the hundreds." Is it that they wanted
  2932.      multicast? Or was the real objection the practical difficulty of
  2933.      adding a second server to a LAN of 300 nodes and then having to
  2934.      change the server entry in 150 ntp.conf files to redistribute the
  2935.      load? ...
  2936.  
  2937. The quote is quite correct. A number of dudes jumped on me to include
  2938. multicasting in the spec. Their perception is more concerned with
  2939. network load than with correctnes; however, I readily admit they might
  2940. not have yet become sensitive to the configuration issues you raise.
  2941. However, I continue to believe the autoconfiguration issue transcends
  2942. NTP and should be considered in a wider context.
  2943.  
  2944.      ... The next topic I'll discuss is the area of the DTS architecture
  2945.      I personally believe is least likely to survive the standardization
  2946.      process unchanged: The timestamp format. I think we have much
  2947.      agreement here.
  2948.  
  2949. I still have a few scars left from old Internet wars on this point,
  2950. including the use of binary versus character-oriented formats and
  2951. whether leap seconds are meaningful. The fact that leap seconds cannot
  2952. be reliably predicted seems to be a showstopper. As long as you must
  2953. have institutional memory for them, it may be easiest to include epoch
  2954. era information using the same mechanism.
  2955.  
  2956.      ... There has been a fair amount of discussion about interoperation
  2957.      of the two time services. Let me try to clarify what I said (too
  2958.      tersely) in my original response to Dave's paper. There are three
  2959.      separate cases I'd like to distinguish  A) An isolated group of DTS
  2960.      systems which obtain time from NTP  B) An isolated group of NTP
  2961.      systems which obtain time from DTS.  C) A collection of DTS and NTP
  2962.      giving time to each other.
  2963.  
  2964.      I believe that without fairly major changes in one or both of the
  2965.      architectures case C is a problem, however it is an easily
  2966.      prevented problem (see below). Cases A and B however are very
  2967.      interesting, useful and I claim easily achievable.
  2968.  
  2969. I see no problem with A and B either, even to the point of equating
  2970. synchronization distance to inaccuracy interval. NTP would have to
  2971. assign a stratum number to a DTS client and DTS might want to mark the
  2972. synchronization distance provided by NTP as a "possibly unreliable
  2973. inaccuracy interval." You have enough bits in the DTS timestamp to even
  2974. do that, as well include leap warnings. I would even suggest amending
  2975. the NTP spec to include such an interface specification and the DTS spec
  2976. to include an identifier for the primary reference source. For this
  2977. reason and in order to suppress neighbor loops, NTP includes the
  2978. synchronization source in the header.
  2979.  
  2980.      ... Case C potentially breaks the invariants of both protocols. The
  2981.      DTS invariant is that UTC is contained within the interval. The NTP
  2982.      invariant (I'm less sure of my statement here) is that the
  2983.      frequency of good servers agree with UTC.
  2984.  
  2985. In fact, the intent is to phase-lock all the clocks to UTC, which means
  2986. both in frequency and time. This is not so much an invariant as a goal;
  2987. although in practice it is achieved in much the same fashion as the
  2988. power grid keeps your electric clocks humming UTC. Yeah, I tried that
  2989. too and investigated whether the power grid itself makes a usable
  2990. time/frequency transfer medium. Even though the guys in Columbus run the
  2991. eastern-divide grid from a WWVB clock, local utilities drop off the grid
  2992. from time to time and do not feel it necessary to maintain phase
  2993. continuity, but that's another story among many other hilarities to be
  2994. shared at another time.
  2995.  
  2996.      ... NTP has a further invariant, that there are no loops in the
  2997.      time distribution network. This is enforced by the stratum. Clearly
  2998.      if DTS took time from a collection of NTP servers and later gave it
  2999.      back to the same collection of servers, a loop could and probably
  3000.      would occur. There is a simple method to prevent this, I propose
  3001.      that the gateway described in case B above always declare itself to
  3002.      be at some fairly high (numerically large) stratum. Potential
  3003.      clients will ignore the DTS/NTP server in favor of servers which
  3004.      obtained their time exclusively via NTP (and have much lower
  3005.      stratum numbers). I'm assuming that the NTP implementation at the
  3006.      gateway can be coerced into using a fixed stratum and would propose
  3007.      a value of 16 for this purpose.
  3008.  
  3009. This is a useful approach and requires only minor mods to the NTP spec.
  3010. However, please don't underestimate the importance of the stratum, which
  3011. is useful to avoid instabilities such as spurious clockhopping and
  3012. loops.
  3013.  
  3014.      ... There's also a stratum zero which is supposed to be used when
  3015.      the stratum is unknown, however I'm not sure I understand what
  3016.      value servers which obtain their time from a stratum zero server
  3017.      will use. Do they use zero? If so, how are loops prevented amongst
  3018.      themselves? ...
  3019.  
  3020. Stratum zero means "undefined," which can mean a lot of things, usually
  3021. that the client has not yet synchronized. NTP peers will not synchronize
  3022. to a stratum-zero peer, but will run the protocol so the peer can get
  3023. synchronized.
  3024.  
  3025.      ... A few nits before we get to the meat of the discussion. Dennis
  3026.      is concerned that the drift has to be input as a management
  3027.      parameter. I'll show my vendor colors here and say this isn't a
  3028.      management parameter but an implementation detail.
  3029.  
  3030. Dennis is not talking about the max frequency offset (I have problems
  3031. with "drift," since in the communications field this means a change in
  3032. frequency with time.), but with the estimated frequency offset produced
  3033. by the local-clock algorithm, which is usually much lower. It can take
  3034. an NTP peer some days to finetune the frequency, compliance and whatnot
  3035. to produce stabilities in the .01-ppm range, so implementations can
  3036. reduce the time to converge by remembering the offset and recovering it
  3037. on reboot.
  3038.  
  3039. The problem I have with arbitrary max's is that they are quartz-centric.
  3040. You can certainly stamp the nameplate with the oscillator tolerance and
  3041. expect it to be maintained throughout the service life of the equipment,
  3042. but I sure wouldn't want to rely on the nameplate in our shop where
  3043. machines are gloriously cannibalized and CPU boards routinely swapped.
  3044. You could, of course, stash info like this in lithium along with the
  3045. Ether address and license serial, but I doubt too many would take it
  3046. seriously. Nevertheless, the same thing you say about DTS applies to
  3047. NTP, assuming the clamp I mentioned previously is added to the frequency
  3048. compensation. The nameplate would then specify the sum of the quartz
  3049. tolerance plus the clamp.
  3050.  
  3051.      ... The second nit has to do with DTS's treatment of leap seconds.
  3052.      I appear not to have been clear here. Dave's original document was
  3053.      basically correct in its description of how DTS handles leap
  3054.      seconds - Servers increase their inaccuracy at the month boundary
  3055.      and a time provider narrows the interval later. When I wrote: "Each
  3056.      server has to maintain and propagate this state before the leap
  3057.      insertion. This is, of course, subject to Byzantine failures. A
  3058.      failing server can insert a bad notification." I was describing my
  3059.      understanding of (and a problem with) NTP's leap second handling.
  3060.      If my understanding of NTP is incorrect, I apologize, but the
  3061.      Byzantine problem seems real to me.
  3062.  
  3063. I still am unsure how to incorporate a leap second into a prolific DTS
  3064. subnet, if I can use the term. I assume all the DTS gizmos in the world
  3065. will ramp up their inaccuracy intervals by one second at the end of
  3066. every month. Let's say a leap second occurs and is eventually recognized
  3067. by most of the radios (all extant radios sail right through a leap, only
  3068. to lose synchronization later and then recover it). This takes a few
  3069. minutes to a few hours. Servers and clerks will discover this fact from
  3070. two to fifteen minutes later. While it is true that the inaccuracy
  3071. interval will be correctly maintained, it may come as a shock to some
  3072. users that for some uncertain period their timestamps suddenly took a
  3073. one-second hit in accuracy. Assuming the time providers are told, either
  3074. by radio or keyboard, that a leap is nigh, it would be possible to
  3075. remove this ambiguity by stealing a bit in the timestamp format.
  3076.  
  3077.      ... Dave asked if I am in substantial agreement with the
  3078.      statistical models presented in his first document. I agree with
  3079.      most of this section. My only significant disagreement is with the
  3080.      last paragraph. It is true that DTS assumes that a system's clock
  3081.      drifts at a rate less than its manufacture's specification, and
  3082.      that a hardware time provider operates within specification. The
  3083.      probablities of these assumption being false are on the order of
  3084.      magnitude of other hardware failures. Software implementation do
  3085.      not routinely checksum memory any more (and they certainly don't do
  3086.      it to find memory errors). Violations of these assumptions
  3087.      represent faults, just as real as processor faults, and should be
  3088.      fixed. Note the long tails you observe in the distributions in the
  3089.      Internet are on message transmission times and the like. These
  3090.      parameters are dynamically measured in the DTS algorithm. Wick
  3091.      Nichols stated: "DTS is willing to accept historical estimates of
  3092.      the probability that a clock will go faulty (with checks for
  3093.      faultiness), but is not willing to accept historical estimates of
  3094.      current network characteristics." in his discussion of this point
  3095.      for the OSF.
  3096.  
  3097. I'm struggling for a way to state my position in the most compact way I
  3098. can, while still being fair to both the DTS and NTP models. I think we
  3099. both agree that there is a tradeoff between accuracy and correctness.
  3100. There will always be some tails in the error distributions for time
  3101. providers, servers and network paths, as we have amply demonstrated over
  3102. the years. Dennis' comments about missed clock interrupts are on the
  3103. mark, as well as pragmatic mysteries on reading clocks in real operating
  3104. systems. Your example of log coordination is a good one, as I have been
  3105. using NTP for several years doing just that. However, in my battles with
  3106. the old NSFNET Phase-I backbone, it was essential that transcontinental
  3107. events (on the backbone) could be tagged accurately within ten
  3108. milliseconds or so. Even today I expect NTP to correctly tag the
  3109. Norwegian atomic clock to within half a second, in spite of gross
  3110. misconduct across the Atlantic, as you may have seen. I thus see neither
  3111. the statistical approach of NTP nor the correctness approach of DTS as
  3112. necessarily "right," just different.
  3113. I did a little experiment you might enjoy. Using the simulator mentioned
  3114. previously and first the NTP and then the DTS selection algorithms, I
  3115. purposely wiggled the offset of one of three clocks from nominal to a
  3116. couple of seconds off, the idea being to create a falseticker in
  3117. gradually increasing steps. The inaccuracy interval in both cases was
  3118. calculated as in DTS, but without a time dependence, since the intervals
  3119. between updates are small and the residual frequency offset is very
  3120. small. While I hardly have enough data to make a definitive judgement, I
  3121. can say that NTP quickly tossed out the bad clock, while DTS hung on for
  3122. dear life rather longer than I would expect. I intend to play with this
  3123. some more.
  3124.  
  3125. My experiment pointed out a possibly noxious issue. I was at pains to
  3126. make sure the inaccuracy interval was computed correctly, starting from
  3127. the primary reference clocks that were in fact peers of the Norwegian
  3128. chimer. However, the path is quite noisy, with effect the customer
  3129. receiving the time-inaccuracy stamps can get wildly differing inaccuracy
  3130. intervals on successive samples. It would seem the DTS customer would
  3131. have to accumulate a number of samples if only to make sure the
  3132. inaccuracy interval was reliable. In principle, this is the same
  3133. strategy you suggest for time providers. I don't see anything
  3134. necessarily wrong with this, but it does demonstrate that escape from
  3135. probabilistic mechanics probably contradicts the third law of
  3136. thermodynamics.
  3137.  
  3138.      ... Dennis asked a question about DTS authentication in the
  3139.      Internet environment. What I personally would like to see is an
  3140.      implementation of DTS using Apollo's NCS which in turn used
  3141.      Kerberos authentication. This is basically what Digital has
  3142.      proposed to the OSF in response to their distributed computing
  3143.      request for technology.
  3144.  
  3145. My friends the electric spooks tell me Kerberos has real conceptual
  3146. problems and that we should salute SNDS instead. Believe it when they
  3147. tell us how to implement KMP and Firefly. Be advised it takes more than
  3148. 100 ms to calculate the NTP cryptosum in an LSI-11/73 (yeah, I know I
  3149. deserve that) and this cannot be compensated unless the protocol can
  3150. measure and adjust the timestamps accordingly (my ISOfriends are much
  3151. aggravated by that position).
  3152.  
  3153.      ... Now to the major contention of Dennis's review, that accuracy
  3154.      and ease-of-management are "completely and utterly orthogonal". I
  3155.      disagree with this less then a reader of my response to Dave might
  3156.      think, though I am somewhat in disagreement with it. What I hold is
  3157.      that ease-of-management, provablility and accuracy for a time
  3158.      service are all interrelated.
  3159.  
  3160. Those guys who actually do mount and run large NTP subsubnets (Merit
  3161. runs 150 chimers in the NSFNET backbone alone, most of which have
  3162. identical configuration files) can speak eloquently about their own
  3163. hardships. That's not to say I don't believe you, just that others
  3164. should make the NTP case.
  3165.  
  3166.      ... The problem with just adding the NTP local clock model to DTS
  3167.      (as I understand the NTP local clock model) is that the resulting
  3168.      system could have wild instabilities. (Maybe my understanding of
  3169.      NTP is incorrect here.) The dynamic nature of the DTS
  3170.      autoconfiguration rules (couriers choosing a random member of the
  3171.      global set for instance) means the the input time driving the local
  3172.      clock model will have what Dave calls "phase noise". As I
  3173.      understand NTP's local clock model this is where the instability
  3174.      creeps in.
  3175.  
  3176. It's not so much the phase noise as it is the dynamics of the local
  3177. clock loop itself, sort of like requiring tickadj to have a confined
  3178. range of adjustment. The rate at which the loop corrects for time and
  3179. frequency errors is fundamental to its stability; otherwise, it could
  3180. surge in much the same fashion as if you tried to drive a car with a
  3181. half-second delay between the steering wheel and the steered wheels. I
  3182. believe, as I hope is demonstrated in NTP implementations, that
  3183. appropriate parameters can be specified and engineered for any
  3184. implementation, either DTS or NTP in much the same way that tickadj is
  3185. engineered now, even on an optional (configured) basis. I envision a
  3186. local-clock implementation appropriate for either NTP or DTS or TSP for
  3187. that matter by selecting either model with engineered parameters
  3188. determined only on the basis of whether you have a line-frequency
  3189. oscillator, an uncompensated quartz oscillator or a GPS receiver or
  3190. atomic clock. This is in fact the fuzzball implementation.
  3191.  
  3192.      ... Further, the existing NTP protocol avoids loops by using a
  3193.      stratum concept, again the DTS autoconfiguration happily produces
  3194.      loops. As I noted previously this doesn't effect the DTS algorithm,
  3195.      but they would cause havoc for NTP. Again one could add complexity
  3196.      to the DTS algorithm to prevent the loops, but I claim one would
  3197.      pay a price in system management cost.
  3198.  
  3199. I perceive the DTS model does not consider more than three "strata"
  3200. (global server, local server, clerk) necessary in a DTS subnet, right?
  3201. If this can be assured, NTP is in fact needlessly complex. However, we
  3202. are not building NTP subnets this way and have found it necessary to use
  3203. a richer hierarchy requiring more strata, even if some LANs have their
  3204. own time providers. One reason for this is a notorious distrust of time
  3205. providers, so all NTP primary servers chime (usually at least three)
  3206. other servers, not even necessarily primary servers. Also, even in this
  3207. university, which is hardly at a loss for time providers (!) we have
  3208. many stratum 4 and probably stratum 5 chimers even now.
  3209.  
  3210.      ... Another problem (according to Dave) is that the resultant phase
  3211.      locked loops have to be analyzed in the light of assumed
  3212.      probability distributions, etc. and one does not end up with the
  3213.      sort of proofs of correctness that are what is liked in DTS. There
  3214.      is one interesting aside on this last point. I believe there is a
  3215.      way one could add clock training to the DTS model and preserve the
  3216.      correctness. If the training algorithm decides to change the rate
  3217.      of the clock by some amount, *increase* the maximum drift rate by
  3218.      that amount. I believe this can be shown provably correct by the
  3219.      techniques in Marzullo's thesis. However, while this improves the
  3220.      precision of the time (the intersystem phase differences and rate
  3221.      differences will be smaller) the inaccuracy (the guarantee given to
  3222.      the user) will be worse! That DTS has chosen not to do this is, of
  3223.      course, the basic philosophical difference about what's important
  3224.      showing up again. However, the existance of at least one method to
  3225.      incorporate clock training into a provable system gives hope that
  3226.      both camps can be satified and in particular that the large body of
  3227.      work on the NTP local clock model can be incorporated. I am not
  3228.      (yet) expert enough in the NTP local clock model to see my way
  3229.      through this.
  3230.  
  3231. While it may be that the inaccuracy interval provided to users may
  3232. degrade slightly if frequency compensation is embraced, the inaccuracy
  3233. jiggles certainly can't be as bad as the rock-n'-roll I see with the
  3234. simulator and Norway data. I sense there is room to jostle on this
  3235. issue.
  3236.  
  3237.      ... The other obvious possibility is to just add the
  3238.      autoconfiguration to NTP. To an extent, this is occuring. The
  3239.      multicast functionallity clearly addreses the ease-of-management
  3240.      issue. However, for NTP servers, I claim that chosing the right
  3241.      server is important enough that it can't be left to an algorithm.
  3242.      Swithing at random between servers reintroduces the clock-hopping
  3243.      problem (the the extra phase noise produced by the clock-hopping
  3244.      will cause problems for NTP.) One could attempt to just pick a set
  3245.      of server at random and stick with them for some long time to
  3246.      reduce clock hopping, but that will produce serious sub-optimality
  3247.      in the case of a changing network configuration (The particular
  3248.      servers being synchronized with might become cut-off from their
  3249.      good time sources, or the paths to them might involve links which
  3250.      become overloaded, and this wouldn't be discovered for a long
  3251.      time.)
  3252.  
  3253. The reason for the NTP selection algorithm is to find the "best" clocks
  3254. from a population possibly including "poor" ones on the basis of
  3255. estimated accuracy, stability and so forth. The selection and weighting
  3256. factors are dynamically determined using what I hope are sound
  3257. statistical principles and are considered so important that only a
  3258. purpose-designed algorithm could do it, much less an autoconfiguration
  3259. scheme. I think what you have in mind are discovery and configuration
  3260. issues, which certainly could be improved were DTS algorithms to be
  3261. mimiced.
  3262.  
  3263. Do you hear a faint echo of the old Xerox Clearinghouse in the far
  3264. distance?
  3265.  
  3266. ------------------------------------------------------------------------
  3267.  
  3268. Date: Fri, 30 Mar 90 08:30:48 PST
  3269. From: comuzzi@took.enet.dec.com
  3270. To: mail11: ;, "@dts-ntp.dis" <UNKNOWN@decpa.pa.dec.com>
  3271. Subject: More discussion of NTP and DTS
  3272.  
  3273. Dennis,
  3274.  
  3275. Sorry for the delay in responding, I wanted to review where we are and
  3276. try and summarize our positions. It happens that I'm not an expert in
  3277. control theory. Mike Soha, who is a student of that subject has already
  3278. responded to your discussion. I look forward to a continued lively
  3279. exchange.
  3280.  
  3281. Dave,
  3282.  
  3283. You've asked this question twice (whether DTS will appear as an Internet
  3284. RFC) and it deserves an answer. It turns out that about three or four
  3285. months ago Ross Callon tried to elicit interest in DTS in the Internet
  3286. Engineering Steering Group (of which he is a member). Ross wanted to
  3287. submit an RFC, but The response was not encouraging, basically he was
  3288. told nobody wanted to think about time services. I agree with your
  3289. observation that it would have been better to have these conversations
  3290. earlier. I'm assuming the ISEG's lack of interest will change if OSF
  3291. selects DTS as one of its Distributed Computing Environment
  3292. technologies. If that happens however, the architecture specification
  3293. will probably be tweaked to reflect other OSF technology selections,
  3294. such as which nameservice, RPC, etc., but we will submit an RFC.
  3295.  
  3296. Even if DTS is not selected, I believe it would still be a good idea for
  3297. DTS to appear as an RFC (I suspect the relevent powers would entertain a
  3298. DTS RFC if you supported it).
  3299.  
  3300. Now continuing the discussion, Dave's observation that DTS is not dead-
  3301. set against clock training is in fact correct. Clock training can be
  3302. viewed as orthogonal to the DTS architecture, though of course any
  3303. training would have to be done in a way which preserved the Marzullo
  3304. proofs. Mike describes in his note a simple proposal he has for
  3305. incorporating clock training. The question I have personally been
  3306. struggling with, and haven't had much success understanding is: In the
  3307. furture, if DTS incorporated the NTP local clock model how much of the
  3308. rest of NTP would have to come along with it? In particular, would the
  3309. various fields in the time response message (e.g., synchronizing
  3310. dispersion) be required? (It seems that these have more to do with the
  3311. clock selection algorithm) Are strata required, or is the loop breaking
  3312. mechanism of inaccuracy (synchronization distance) sufficient? Can the
  3313. local clock model be proven to be stable for all input? Earlier, I got
  3314. the impression that this could only be done by making rather strong
  3315. assumptions about the network distribution functions, etc. Now I'm not
  3316. at all sure of that, based on recent statements from Dave and Dennis. I
  3317. hope this will fall out of the continuing 'control theory' discussion.
  3318.  
  3319. Dave correctly observes that the DTS architecture only has a three level
  3320. hierarchy. The DTS architecture has been extended (as part of the OSF
  3321. submission) to permit the specification of a local set which is not
  3322. autoconfigured. Basically, the local set is enumerated in a nameservice
  3323. directory just like the global set. This permits construction of a
  3324. hierarchy in which one level's global set is another level's local set.
  3325. Obviously this is only autoconfiguring at the leaves, but it does permit
  3326. construction of as complex a hierarchy as one would desire. We are *NOT*
  3327. going to tell customers to do this, and the vast majority of customers
  3328. will be quite content never thinking about strata or multi-level
  3329. hierarchies.
  3330.  
  3331. The real difference of opinion here is whether the majority of extended
  3332. LANs will have their own time providers. DTS assumes that TPs are
  3333. becoming commonplace. In that case, one only does WAN transactions as a
  3334. check for inter-XLAN time differences, and to support small (TPless)
  3335. LANs. For this environment, the short hierarchy suffices.
  3336.  
  3337. Thinking about the "autoconfiguration vs. accuracy" issue in light of
  3338. the the different TP availablity assumptions, I believe I understand the
  3339. disagreement. (I think Dennis had figured this out too, I just hadn't
  3340. read what he was saying!) DTS derives much of its ease-of-management
  3341. because it only thinks in terms of a three level hierarchy, it
  3342. autoconfigures the leaves, and it uses a single global set stored in the
  3343. namespace. If NTP was used in a similar manner, then NTP could be made
  3344. equally autoconfiguring. I agree. The point I was trying to push is that
  3345. when you create a new server for NTP, you have to figure out where to
  3346. put it in the grand hierarchy and further you have to select peers for
  3347. it that will provide reasonable quality time. Now if you don't have an
  3348. NTP hierarchy, then my argument is specious -- the same strategy that
  3349. works for DTS would work for NTP.
  3350.  
  3351. To summarize (I believe) Dennis' position: NTP can be made just as
  3352. autoconfiguring as DTS. Indeed it already has some of the
  3353. autoconfiguration due to its multicast mode; it just needs the discovery
  3354. mechanism. The result would be more accurate than DTS, due to clock
  3355. training. My position would reduce to:
  3356.  
  3357. DTS is a simpler protocol which already has the autoconfiguration and
  3358. could be made more accurate by adding some clock training. These
  3359. positions are not that far apart. There is still a remaining
  3360. disagreement: how much clock training or other complexity to add and
  3361. what the optimal amount of complexity is from a cost-benefit analysis.
  3362. Now, as I understand Dave on the autocofiguration issue, his position
  3363. is: TPs are not (and will not become in the near future) that
  3364. commonplace, so more than a three level hierarchy is required. Hence
  3365. only the leaves can be made autoconfiguring and there will always be
  3366. some residual manual configuration. (I'm looking for an agreement on
  3367. what our various position are here, I am willing to accept that we
  3368. disagree for now.)
  3369.  
  3370. Considering the larger question of "manageability vs accuracy" there is
  3371. still a lot of complexity in NTP which manifests itself as more
  3372. management complexity. I observe there are at least three parameters
  3373. (associated with the filter and selection algorithms) whose description
  3374. includes the sentence "While the value of ... is suggested, the value
  3375. may be changed to suit local conditions on particular peer paths" (or
  3376. similar text). This seems to me a rather frank admission of more
  3377. management (as opposed to more work for implementors). We seem to have
  3378. no agreement (due to our different goals of how much accuracy to deliver
  3379. in the first place) on these trade-offs.
  3380.  
  3381. I believe there two issues where we have reached complete agreement:
  3382. Both Dave and Dennis seem to be in agreement that NTP can be modified to
  3383. include a provable inaccuracy bound, equivalent to DTS's inaccuracy.
  3384. (I'll stick to the DTS jargon because I'm more comfortable with it.
  3385. Dave's term confidence interval is a reasonable name.) This interval
  3386. could be provided to the end user. I believe this also. I hope that NTP
  3387. will continue to evolve in this direction, independent of the OSF
  3388. decision. Second, I believe we are in agreement on how (adequate)
  3389. interoperation between the protocols could be achieved. I'll sign-up to
  3390. discuss this in the DTS RFC.
  3391.  
  3392. I am curious about Dave's experiments with the DTS algorithm. Dave, can
  3393. you provide more details (possibly out-of-band to this discussion)?
  3394.  
  3395. This note is already longer than I intended, so I'll send it out. I'll
  3396. keep the discussion of layering a time service over an authenticator
  3397. (that Bill raised) for later.
  3398.  
  3399. ------------------------------------------------------------------------
  3400.  
  3401. Date: Mon, 2 Apr 90 10:00:22 PDT
  3402. From: Michael Soha LKG1-2/A19 226-7658 <soha@nerva.enet.dec.com>
  3403. To: dennis@gw.ccie.utoronto.ca
  3404. Cc: decpa::"Mills@udel.edu", decpa::"elb@mwunix.mitre.org",
  3405.      decpa::"marcus@osf.org", soha
  3406. Subject: My response to Dennis Ferguson's NTP vs DTSS memo - retry
  3407.  
  3408. Dennis,
  3409. When I first read this memo, I discounted it as part of an emotional
  3410. discussion of why NTP is the right choice. However upon reflection I
  3411. felt it necessary to respond to the many issues alluded to in the memo.
  3412. The problem I have with this memo is twofold: there are several
  3413. statements that are simply incorrect, and some of the deductive
  3414. reasoning is questionable. I will apologize beforehand for my bluntness
  3415. in this memo; however, I find it necessary due to the amount of
  3416. misconceptions in areas such as: UTC, quartz oscillator theory, and time
  3417. transfer techniques.
  3418.  
  3419. As a general comment I find this discussion, NTP vs DTSS, becoming a
  3420. very emotional debate. In an effort to move this discussion to a more
  3421. technical plane I suggest that people specifically note their
  3422. references; I have attached mine at the end of this response.
  3423.  
  3424. TRAINING
  3425.  
  3426. I'd like to begin with a discussion of one of my major concerns with
  3427. NTP: Training of clocks (and the local clock model). Looking at Dave's
  3428. NTP specification, Ref 1, page 36 I read "The Fuzzball logical-clock
  3429. model, which is shown in Figure 3, can be represented as an adaptive-
  3430. parameter, first-order phase lock loop, which continuously adjusts the
  3431. clock phase and frequency to compensate for its intrinsic jitter,
  3432. wander, and drift.? And the last two sentences of this section (ppg 37-
  3433. 38) read: "The effect is to provide a broad capture range exceeding four
  3434. seconds per day, yet the capability to resolve oscillator drift well
  3435. below a msec per day. These characterists are appropriate for typical
  3436. crystal controlled oscillators with or without temperature compensation
  3437. or oven control."
  3438.  
  3439. Given these statements I conclude: 1. that the clock model attempts to
  3440. remove both short term (environmental) and long term drift components
  3441. (aging and initial offset); and 2. for an uncompensated crystal
  3442. oscillator one can attained a stability on the order of one part in
  3443. 10**8 (ie, 1 msec/day). I disagree with both conclusions and that is why
  3444. I cannot accept the NTP clock model.
  3445.  
  3446. The influences on oscillator frequency include [REF 2-6] include:
  3447.  
  3448. TIME - short term (noise), long term aging
  3449. TEMPERATURE - static freq vs temp, thermal history (hysteresis)
  3450. ACCELERATION - vibration, shock, acoustic noise
  3451. IONIZING RADIATION - steady state, pulse
  3452. OTHER - initial offset, power supply voltage, humidity, load impedance
  3453.  
  3454. The above list has a number of contributors that are of more interest to
  3455. DOD than the computer field. Reviewing a crystal oscillator catalog [Ref
  3456. 6] one sees the main contributors being: time, temperature, initial
  3457. offset and power supply voltage. Now the question becomes what are the
  3458. relative magnitudes of these drift contributors. Let's look at a
  3459. uncompensated (ie, without temperature compensation) 5 Mhz CMOS Clock
  3460. Oscillator, VECTRON part # CO-416B option 5. The numbers are:
  3461.  
  3462.      Accuracy at 25 degrees C:     +/- 10ppm
  3463.      0 to 50 degrees C:            +/- 5ppm
  3464.      Aging                         3 ppm/year first year
  3465.                                    2 ppm/year thereafter
  3466.      Supply Voltage                little impact since it's
  3467.                                    on the order of 10**-7/% change
  3468. Now assuming one has no control over the environment (ie, it may be
  3469. sitting in my office or tuck away in a closet) then the noise floor is
  3470. on the order of +/- 5ppm (temp stability). This may seem a little
  3471. extreme, but you have to realize that a protocol designer has little
  3472. control over the internal temperature gradients of a computer system.
  3473.  
  3474. Given the background noise of +/- 5ppm, one cannot measure the error
  3475. associated with aging 3 ppm/year (approx 10**-9/day). The best one can
  3476. expect to do is to get close to +/- 5ppm. The bottom line is that one
  3477. cannot train an oscillator in an uncompensated environment because of
  3478. the noise (ie, instability due to the environment). Given this, how can
  3479. the NTP clock model achieve a stability of one part in 10**8 (ie, less
  3480. than a msec/day) for an uncompensated oscillator? My conversations with
  3481. other people in this field indicate that it is simply not possible.
  3482.  
  3483. Now why did we pick a number like 10**4. Well assuming a lifetime of 10
  3484. years, the stability of this oscillator would be (at the end of 10
  3485. years) about 36 ppm or 3.6 part in 10**5 (5 ppm for temp, 21 ppm for
  3486. aging, 10 ppm accuracy). We felt that one part in 10**4 would be true
  3487. for most of the VAX crystal oscillators.
  3488.  
  3489. It is my belief, that one may be able to account for the error
  3490. associated with the intial offset (ie, actual milling and polishing of
  3491. the crystal). In the case of DTSS, one may be able to improve the clock
  3492. stability from one part in 10**4 to about 1 part in 10**5. I would
  3493. simply measure the error of the clock over a day (approx 10**5 seconds).
  3494. Assuming I knew UTC to within 100 msec, I'd have enough significant data
  3495. to calculate the oscillator drift to about one part in 10**5 (10**5
  3496. seconds/100 msec = 10**6). To do this one would need a S/W clock that is
  3497. not adjusted; it must be able accumulate the error over a day. Once the
  3498. new tick value is determined, one could update the timer interrupt
  3499. routine. Note that this correction is orthognal to DTSS operation and
  3500. need not be done that frequently? the 10**5 value would be correct for
  3501. at least a year since the stability after one year would be +/- 8 ppm (5
  3502. pmm for temp and 3 ppm for aging).
  3503.  
  3504. ------------------------------------------------------------------------
  3505.  
  3506. Date  Tue, 3 Apr 90 5:12:09 GMT
  3507. From  Mills@udel.edu
  3508. To    Michael Soha LKG1-2/A19 226-7658 <soha@nerva.enet.dec.com>
  3509. cc    dennis@gw.ccie.utoronto.ca, comuzzi@took.dec.com, mills@udel.edu
  3510. Subject? Re? My response to Dennis Ferguson's NTP vs DTSS memo - retry
  3511.  
  3512. This message is in response to your reply to Dennis Ferguson's recent
  3513. message about the NTP local-clock model and its implications. I would
  3514. like to thank you and others at DEC for the time and care you have put
  3515. into the recent message exchanges. I think we have all learned useful
  3516. things that might be applied to ongoing and future projects. However, I
  3517. want to make clear that my interest in pursuing this discussion is not
  3518. to establish which of DTS or NTP is "better," but what can be learned to
  3519. improve them or a future enhanced protocol. I realize the importance to
  3520. DEC's agenda of capturing the standards process and have no personal
  3521. interest in competing with this or obstructing it. Based on experience,
  3522. however, I do want very much to promote that, whatever standard is
  3523. adopted inside or outside the Internet community, the performance
  3524. objectives attributed to NTP are at least potentially attainable, either
  3525. in the emerging protocol stack or enhancements of it.
  3526. I suspect Dennis might want to produce his own reply; however, I will
  3527. respond to the technical points you raise. I am not including the text
  3528. of either yours or Dennis' original message, since that might increase
  3529. the bulk to unbearable levels.
  3530.  
  3531. What Dennis has called "clock training" and I have called "frequency
  3532. compensation" was introduced several years ago in the local-clock model
  3533. adopted in NTP. The primary reason for doing this is to eliminate the
  3534. need to precalibrate the inherent frequency offset of the reference
  3535. oscillator and to serve as a digital filter to reduce the timing errors.
  3536. In fact, the model was introduced prior to NTP and has evolved over
  3537. several generations of time-transfer systems since 1979. As you know, it
  3538. is described as an adaptive-parameter, first-order, type-II phase-locked
  3539. loop (PLL), which is analyzed in many books, including those cited by
  3540. each of us. While a type-I PLL is unconditionally stable, this type of
  3541. loop cannot remove all timing errors, since it cannot compensate for
  3542. frequency errors. A type-II PLL can do this, but this type of loop can
  3543. become unstable, unless it is engineered according to established
  3544. principles. The NTP PLL has been rigorously analyzed, designed,
  3545. simulated and implemented according to these principles. The cost for
  3546. this is additional architectural constants and tighter tolerances to
  3547. maintain overall stability.
  3548.  
  3549. The constants called out in the NTP spec were arrived at after
  3550. substantial analysis, simulation and experiment using Internet paths
  3551. ranging from high-speed LANs to those spanning the globe. A detailed
  3552. mathematical analysis can be found in Appendix F of the February 1990
  3553. revision of the NTP spec, which has not appeared yet as an RFC, but can
  3554. be FTPed from louie.udel.edu as the PostScript file pub/ntp/ntp.ps or I
  3555. can mail you a paper copy if you wish. By the way, the local-clock
  3556. algorithm described in the existing spec, Section 5, has minor errors in
  3557. a couple of places, including some of the recurrence equations. This
  3558. section was completely rewritten in the revised spec and several new
  3559. appendices added. I am currently working on another appendix on error
  3560. analysis.
  3561.  
  3562. An important principle in the design of the local-clock algorithms was
  3563. that the protocol itself should not limit the possible application to
  3564. precision time and frequency transfer and that it be scalable to very
  3565. high speeds, hopefully beyond a gigabit. Surely, there are no hosts
  3566. today that can achieve anything remotely close to 232 picoseconds, but
  3567. there are a number of time-transfer applications using special equipment
  3568. where NTP might be useful, including our own gigabit network research
  3569. program. The same principles arise when synchronizing mundane computers
  3570. on the Internet. Not all hosts can or even need to achieve millisecond
  3571. time transfer and sub-ppm stability; however, I did not want the spec or
  3572. algorithms to be the limiting factors.
  3573.  
  3574. I have explored in depth the design and capabilities of the local-clock
  3575. reference oscillators found in typical computing equipment and concluded
  3576. the time and frequency transfer claims made in NTP are justified.
  3577. Further discussion on this point can be found in my paper in the January
  3578. 1990 issue of ACM Computer Communication Review and in my paper to
  3579. appear in IEEE Trans. Communications. PostScript versions of these
  3580. papers can be FTPed from louie.udel.edu as the PostScript files
  3581. pub/ntp/ccr.ps and pub/ntp/trans.ps or I can mail you paper copies if
  3582. you wish.
  3583.  
  3584. You call out specifications of a typical uncompensated quartz oscillator
  3585. as:
  3586.      Accuracy at 25 degrees C:     +/- 10ppm
  3587.      0 to 50 degrees C:            +/- 5ppm
  3588.      Aging                         3 ppm/year first year
  3589.                                    2 ppm/year thereafter
  3590.      Supply Voltage                little impact since it's
  3591.                                    on the order of 10**-7/% change
  3592.  
  3593. These specifications are in fact much better than those I find in
  3594. typical computing equipment, where frequency inaccuracies up to 100 ppm,
  3595. temperature sensitivities up to 1 ppm per deg C and aging rates up to
  3596. 0.1 ppm per day (36 ppm per year) have been measured. By contrast, the
  3597. $700 Isotemp 5-MHz OCX0s used here have a specified stability of +-
  3598. 5x10^-9 from 5 to 55 deg C and aging rate of 1x10^-9 per day after 30
  3599. days. We keep them honest with a cesium oscillator calibrated by USNO.
  3600.  
  3601. In spite of widespread mediocrity and while only a few NTP servers are
  3602. equipped with precision oscillators (two have cesium oscillators (three
  3603. have OCXOs and one a TCXO), the vast majority of NTP-controlled
  3604. oscillators can hold frequency surprisingly well. In these oscillators
  3605. the dominant error term is neither noise nor short-term stability, but
  3606. temperature sensitivity. Under typical indoor conditions both in and out
  3607. of machine rooms, I have often opened the PLL loop at a primary server
  3608. and found it within a few milliseconds of reference time after coasting
  3609. for some days without outside correction.
  3610.  
  3611. Of course, not all oscillators conform to these anecdotal observations;
  3612. however, a goal in the NTP design was to provide the highest possible
  3613. performance with whatever oscillator is available. In fact, one reason
  3614. for the adaptive-parameter design was to automatically optimize the loop
  3615. bandwidth for the particular oscillator stability characteristics, with
  3616. the baseline assumed on the basis of expected diurnal variations of a
  3617. few ppm over the 24-hour period. You quite the spec:
  3618.  
  3619.      The effect is to provide a broad capture range exceeding four
  3620.      seconds per day, yet the capability to resolve oscillator drift
  3621.      well below a millisecond per day. These characteristics are
  3622.      appropriate for typical crystal controlled oscillators with or
  3623.      without temperature compensation or oven control.
  3624.  
  3625. The intent is to state that the characteristics are appropriate for
  3626. oscillators with and without temperature compensation (indeed, the loop
  3627. adapts to each type) and (with the appropriate oscillator) stabilities
  3628. of a millisecond per day are achievable. I hope the quote was not
  3629. misleading.
  3630.  
  3631. For clarification on a few other points you raise, note that the NTP PLL
  3632. does not attempt to compensate for quartz aging, which results in a
  3633. gradual change in frequency over time. This of course requires a type-
  3634. III PLL, which is in fact used in some disciplined secondary frequency
  3635. standards built for digital telephone network synchronization; however,
  3636. I did not feel in this case that the additional complexity required
  3637. would be justified. I did in fact experiment with a second-order type-II
  3638. PLL in order to further minimize the phase noise, but this raised
  3639. problems due to the tight constraints on update intervals. The type-II
  3640. loop is stable throughout the range that results in two-way
  3641. reachability.
  3642.  
  3643. Your note suggests an alternative to the perceived complexity of the NTP
  3644. PLL is a manual observation of the frequency error measured over a day,
  3645. which could presumably be done at installation and saved in a file for
  3646. recall at system reboot. This is exactly what Dennis has done. It might
  3647. be just as easy to equip the oscillator module with a trimmer capacitor
  3648. and trim out the error when the module is built. However, the intent in
  3649. NTP was to do this automatically, with the startup value used only if
  3650. available and in order to reduce the initial convergence time.
  3651.  
  3652. Following are specific responses to some of your technical comments.
  3653. Dennis may have some more of his own. Your quote from "Modern Control
  3654. Engineering" by Ogata, p. 7:
  3655.  
  3656.      From the point of view of stability, the open loop control system
  3657.      is easier to build since stability is not a major problem. On the
  3658.      other hand, stability is always a major problem in the closed loop
  3659.      system since it may tend to overcorrect errors which cause
  3660.      oscillations of constant or changing amplitude".
  3661.  
  3662. You go on to say a type-II system is more apt to be unstable than a
  3663. type-I. Since both DTS and NTP derive timestamps relative to the local
  3664. clock, both are certainly closed-loop systems. As mentioned previously,
  3665. type-I systems (DTS) are unconditionally stable; however, type-II
  3666. systems can be stabilized through good engineering design such as
  3667. alleged in NTP. I can't answer the question of whether this is the best
  3668. design appropriate for all conditions; however, the design has been
  3669. validated over the sometimes ludicrously large envelope of conditions
  3670. found in Internet LANs and WANs over the past decade.
  3671.  
  3672. Your comment on "UTC accuracy to the nanosecond" requires frequent trips
  3673. to USNO, of course. The proper statement should be "time transfer to the
  3674. subnanosecond, UTC transfer to the limits of the available timekeeping
  3675. components and time provider." GPS can achieve precisions of a few
  3676. nanoseconds only if the ephemeris dither is turned off, which after the
  3677. recent announcement is not likely. Kinemetrics claims their GPS time
  3678. provider (with GPS receiver actually manufactured by Rockwell Collins)
  3679. is accurate to 100 ns relative to USNO and 250 ns relative to UTC. As to
  3680. the CCIR expectation of UTC dissemination to the microsecond, the whims
  3681. of the US Congress were not respected. Current legislation requires
  3682. LORAN dissemination to 500 ns and the Coast Guard expects to improve
  3683. that to the order of 50 ns. Judging from measurements made by my grad
  3684. student and published USNO corrections, there does not seem any chance
  3685. to achieve that. On the other hand, NTP was also intended for local time
  3686. transfer, for which the 232-ps resolution would seem to be justifiable.
  3687.  
  3688. Your comments on NTP's lack of formal proofs are well taken. While these
  3689. goals may have been neglected with respect to goals of performance, I
  3690. think we all agree that minor changes can easily be made to NTP with the
  3691. effect that claims similar to those made for DTS can be made for NTP. In
  3692. fact, as experiment I crafted Marzullo's algorithm into the NTP
  3693. simulator I use for evaluation and am testing it as part of the
  3694. algorithmic components. The result is no decrease in accuracy and,
  3695. presumably, a correctness capability. Note that the NTP "inaccuracy" is
  3696. calculated in the same way as DTS, but includes only a maximum bound on
  3697. the frequency error per day.
  3698.  
  3699. You make an important point about estimating the state of the network at
  3700. one time based on observations about its state at another. I worry about
  3701. this, too, and have accumulated a rather large collection of measurement
  3702. data between NTP servers in the Internet. Some conclusions on this issue
  3703. can be found in the papers cited above. In particular, I have used NTP
  3704. on many occasions as a management tool to detect changes in network
  3705. routing and as an alert for congestion conditions. The fact that it runs
  3706. continuously and produces accuracies to the order of a few milliseconds
  3707. on most primary and secondary servers relative to extant path delays has
  3708. proved a highly useful diagnostic tool.
  3709.  
  3710. Your comment that one-way delay asymmetries can lead to estimation
  3711. errors applies to both DTS and NTP, of course. However, most NTP servers
  3712. run the protocol with at least three peers via diverse paths and some of
  3713. them use the algorithms described in the 1978 NBS monograph you
  3714. reference to reduce the errors. The February 1990 spec revision
  3715. describes how this is done and presents the statistical justification
  3716. for it. In practice, asymmetries as large as the 100 ms you report are
  3717. quite rare on the Internet, although those of 10-20 ms are common and
  3718. some (US-European) paths are as high as 70 ms. Mixed satellite-
  3719. terrestrial paths have in the past haunted us, but the only ghost left
  3720. now seems the USAN network.
  3721.  
  3722. While I realize our recent message exchanges have required substantial
  3723. time investments for each of us, I would like to again emphasize the
  3724. value of an ongoing dialog within the research and engineering
  3725. communities. I have strived to maintain an objective and productive tone
  3726. in these exchanges and would like to encourage you to share ideas,
  3727. experiences and even flames with us and to participate in experiment
  3728. opportunities as they develop.
  3729.  
  3730. ------------------------------------------------------------------------
  3731.  
  3732. Date:     Tue, 3 Apr 90 19:42:38 EST
  3733. From:     Dennis Ferguson <dennis@gw.ccie.utoronto.ca>
  3734. To:  soha@nerva.enet.dec.com
  3735. Cc:  comuzzi@took.dec.com, mills@udel.edu
  3736. Subject: Re? My response to Dennis Ferguson's NTP vs DTSS memo - retry
  3737.  
  3738. I must apologize for the tone of the last message. Chalk it up to a
  3739. little bit of frustration concerning the course things seemed to be
  3740. taking. Let me make it very clear that my interests are in good quality
  3741. network timekeeping. I have some understanding of the issues, and I like
  3742. implementing software which does this stuff well. I have no emotional
  3743. attachment to either NTP's, or anyone else's, packet or timestamp
  3744. formats, nor do I stand to gain much benefit from playing with this
  3745. stuff. I will likely do a DTS implementation no matter what form it ends
  3746. up being standardized in, I'm just not going to like it much if it isn't
  3747. a good protocol.
  3748.  
  3749. What I do like is good quality timekeeping. I suspect NTP's encounter
  3750. with DTS will make it a better, more usable protocol, At this point you
  3751. can bet that NTP version 3 will include a correctly determined
  3752. uncertainty interval, and very likely won't go out without an
  3753. autoconfiguration protocol and procedures for authentication key
  3754. management as well as an SNMP MIB. None of these conflict with the
  3755. machinery that NTP already includes, which is very good at keeping your
  3756. clock accurate.
  3757.  
  3758. What bothers me is that I would not like to see an international
  3759. standard timekeeping protocol which is substantially less accurate than
  3760. NTP, just because at this stage there is just no reason for it. The idea
  3761. of not providing frequency compensation for your system clock is hence a
  3762. wee bit shocking, and I also see no reason for you to ignore the NTP
  3763. clock selection/combination procedures as long the offset it produces
  3764. lies within the uncertainty interval. Incorporating the authentication
  3765. procedures within the protocol, while unclean, also has its advantages.
  3766.  
  3767. In any event, I won't go on for long here since Dave has covered most of
  3768. the issues and I'd rather spend the time implementing whatever he
  3769. produces in the way of "correct NTP", if only to prove that one can be
  3770. both correct and accurate with one's timekeeping.
  3771.  
  3772. Just a couple of additions to Dave's comments on frequency compensation
  3773. (I didn't call it clock training, either) of the local clock. The code
  3774. implements a PLL, this is certainly covered in Time and Frequency
  3775. Fundamentals and is common place in the time keeping industry. Indeed,
  3776. if you pry the cover off of a good quality IRIG-? time code receiver (I
  3777. have technical documentation for several made by Trak Systems), or even
  3778. a good quality WWVB or GOES receiver, you will very likely find a
  3779. microprocessor inside which implements pretty much the same procedure to
  3780. synchronize the local oscillator (this is often called a "disciplined
  3781. oscillator" in the advertising brochures).
  3782.  
  3783. Further, NTP's local clock really is separate and distinct from the
  3784. network time exchange protocol (whether NTP or DTS). It is actually part
  3785. of the kernel in fuzzballs, and Dave has been encouraging Louie Mamakos
  3786. to insert it into the 4.4 BSD kernel behind the adjtime() interface
  3787. (something which I have some reservations about, but certainly not on
  3788. the basis of it being NTP-specific. It just isn't). NTP's local clock is
  3789. not a timekeeping protocol, it sits behind the timekeeping protocol and
  3790. receives offset estimates from the latter. Your comment about "DTS and
  3791. NTP are both timekeeping protocols" was way off the mark.
  3792.  
  3793. You are right that there are tradeoffs between the type II control loop
  3794. that NTP uses and DTS' type I control. Note that an error in frequency
  3795. in essence presents a ramp input, whose slope is the frequency error (or
  3796. drift), to your control loop. The slope of the input sometimes changes
  3797. (usually with temperature, I have a plot pegged to the wall beside my
  3798. desk of the temperature calibration of the crystal in my workstation,
  3799. measured with NTP. The slope is about -1.1 ppm/C), though changes to the
  3800. frequency error are normally quite small compared to the longer-term
  3801. average.
  3802.  
  3803. The NTP type II loop does several things right. First, it tracks the
  3804. ramp input (i.e. the frequency error) with zero steady state error. It
  3805. will also track changes in the frequency error (i.e. "drift" variations)
  3806. fairly accurately if they occur slowly enough. DTS can't do this, it
  3807. exhibits a steady state error when tracking a ramp proportional to the
  3808. slope. Changes in the slope change the steady state error.
  3809.  
  3810. Second, because the time constant of the loop is fairly long, the NTP
  3811. type II loop tends to damp out statistical noise in the data you are
  3812. trying to phase lock to (i.e. the offsets produced by the time exchange
  3813. protocol). DTS' type I loop, however, allows this jitter right through
  3814. to the system clock.
  3815.  
  3816. Third, while unrelated to type I versus type II, the NTP local clock
  3817. applies an adjustment to the system clock by making little tiny
  3818. adjustments once every 4 seconds, rather than all at once. This
  3819. spreading out of the adjustment avoids the high frequency jitter that is
  3820. otherwise caused. Note that for the archtypical, 100 ppm frequency
  3821. error, DTS synchronized clock, we've agreed that the system clock will
  3822. be zooming around by 90 ms over the 15 minute update interval, with an
  3823. average (steady state) error of 45 ms. The NTP local clock, when faced
  3824. with a 100 ppm error for which it doesn't know the correction, (this can
  3825. happen when you run the daemon on a machine for the first time, it is
  3826. analogous to a large step change in the slope of the signal you are
  3827. tracking) will exhibit a transient error which is initially about 40 ms
  3828. in magnitude as well, but this will be stable without the big jitter.
  3829.  
  3830. What you lose for this is speed in correcting step changes in the clock
  3831. condition. DTS can correct the system clock offset which can occur at
  3832. startup in the first update. Similarly, DTS will almost immediately
  3833. assume the steady state operating condition as soon as it is started on
  3834. a machine. Offsets due to lost clock interrupts are corrected within an
  3835. update or two as well. The NTP local clock takes longer to correct these
  3836. types of events, and/or requires a higher update rate while doing so.
  3837.  
  3838. Now the tradeoff. Local oscillators whose frequency is wrong, and whose
  3839. frequency varies, are a fact of life. This is very nearly always the
  3840. case. Likewise, statistical jitter in the offsets produced by the
  3841. timekeeping protocol (whether NTP or DTS) is equally unavoidable, so
  3842. damping of these fluctuations is highly desireable.
  3843.  
  3844. Thus the NTP local clock deals with the common case (a system clock
  3845. whose frequency is inaccurate and which varies somewhat, and somewhat
  3846. noisy data from the network) much more accurately than DTS' type I
  3847. control. On the other hand, it corrects startup transients and responds
  3848. to step changes due to things like lost clock interrupts, more slowly
  3849. than DTS does (it deals with these things, but at a more stately pace).
  3850. Note that the latter are exceptions, however, since you start the
  3851. protocol infrequently and you hope you don't lose clock interrupts at
  3852. all. Thus the NTP local clock optimizes performance in the ordinary case
  3853. at some expense to speed when handling exceptional conditions. I think
  3854. this is a good engineering tradeoff.
  3855.  
  3856. I think frequency compensation of the system clock is a must for DTS,
  3857. and I'm not going to be happy if it progresses towards standardhood
  3858. without it. I'm also not convinced that you shouldn't be looking at the
  3859. way NTP filters and selects samples, since this does measureably improve
  3860. your time but certainly doesn't preclude the calculation of a correct
  3861. uncertainty interval.
  3862.  
  3863. I think I may have said enough, since I obviously have yet to convince
  3864. anyone. The more I consider it, though, the more I think the
  3865. correctness-and-management versus performance tradeoff is just so much
  3866. baloney. These issues are all separable, I see no reason why you can't
  3867. have everything in one protocol. I think rather than trying to argue
  3868. this position, however, it might be better to spend the time on
  3869. producing a correct, autoconfiguring, accurate NTP that I can give to
  3870. people so that no one at the standards committee will believe you if you
  3871. try to foist this argument off on them.
  3872.  
  3873. By the way, it occurs to me that an NTP which computes a correct
  3874. uncertainty interval will allow us to make head-to-head performance
  3875. comparisons between DTS and NTP. If both protocols compute provably
  3876. correct inaccuracies, but one consistantly produces a smaller inaccuracy
  3877. on the same machines via the same network paths, is not the latter a
  3878. better, more useful protocol? I think so, and I have a distinct feeling
  3879. both NTP's local clock and clock filters are going to make this quite
  3880. interesting. We may be able to convince you DTS needs some of this stuff
  3881. after all.
  3882. ------------------------------------------------------------------------
  3883.